Skip to content

Commit 4a8db36

Browse files
ColinIanKingjrjohansen
authored andcommitted
apparmor: remove useless static inline function is_deleted
The inlined function is_deleted is redundant, it is not called at all from any function in security/apparmor/file.c and so it can be removed. Cleans up clang scan build warning: security/apparmor/file.c:153:20: warning: unused function 'is_deleted' [-Wunused-function] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
1 parent 2bc7350 commit 4a8db36

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

security/apparmor/file.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,6 @@ int aa_audit_file(const struct cred *subj_cred,
144144
return aa_audit(type, profile, &ad, file_audit_cb);
145145
}
146146

147-
/**
148-
* is_deleted - test if a file has been completely unlinked
149-
* @dentry: dentry of file to test for deletion (NOT NULL)
150-
*
151-
* Returns: true if deleted else false
152-
*/
153-
static inline bool is_deleted(struct dentry *dentry)
154-
{
155-
if (d_unlinked(dentry) && d_backing_inode(dentry)->i_nlink == 0)
156-
return true;
157-
return false;
158-
}
159-
160147
static int path_name(const char *op, const struct cred *subj_cred,
161148
struct aa_label *label,
162149
const struct path *path, int flags, char *buffer,

0 commit comments

Comments
 (0)