diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2024-03-04 16:36:55 +0000 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2024-05-10 08:44:43 -0700 |
commit | 4a8db3678403e34c31df6b99a26414d5e183538c (patch) | |
tree | d99342b10fa139899a4865f505ca2af861343d96 /security/apparmor | |
parent | 2bc73505a5cd2a18a7a542022722f136c19e3b87 (diff) |
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>
Diffstat (limited to 'security/apparmor')
-rw-r--r-- | security/apparmor/file.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/security/apparmor/file.c b/security/apparmor/file.c index c03eb7c19f16..d52a5b14dad4 100644 --- a/security/apparmor/file.c +++ b/security/apparmor/file.c @@ -144,19 +144,6 @@ int aa_audit_file(const struct cred *subj_cred, return aa_audit(type, profile, &ad, file_audit_cb); } -/** - * is_deleted - test if a file has been completely unlinked - * @dentry: dentry of file to test for deletion (NOT NULL) - * - * Returns: true if deleted else false - */ -static inline bool is_deleted(struct dentry *dentry) -{ - if (d_unlinked(dentry) && d_backing_inode(dentry)->i_nlink == 0) - return true; - return false; -} - static int path_name(const char *op, const struct cred *subj_cred, struct aa_label *label, const struct path *path, int flags, char *buffer, |