summaryrefslogtreecommitdiff
path: root/security/apparmor/file.c
diff options
context:
space:
mode:
authorGaosheng Cui <cuigaosheng1@huawei.com>2022-09-26 10:28:39 +0800
committerJohn Johansen <john.johansen@canonical.com>2022-10-24 22:35:11 -0700
commit2f7a29debae2efef94b981377fa3622986cd57f5 (patch)
tree0de4ca6170bfd6ee0b2f880df7d6429ae3393bf9 /security/apparmor/file.c
parent53991aedcd34760be23f1b0ef312e39b6add84af (diff)
apparmor: remove useless static inline functions
Remove the following useless static inline functions: 1. label_is_visible() is a static function in security/apparmor/label.c, and it's not used, aa_ns_visible() can do the same things as it, so it's redundant. 2. is_deleted() is a static function in security/apparmor/file.c, and it's not used since commit aebd873e8d3e ("apparmor: refactor path name lookup and permission checks around labels"), so it's redundant. They are redundant, so remove them. Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/file.c')
-rw-r--r--security/apparmor/file.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/security/apparmor/file.c b/security/apparmor/file.c
index e7dc5ea38997..deb73480f0c6 100644
--- a/security/apparmor/file.c
+++ b/security/apparmor/file.c
@@ -141,19 +141,6 @@ int aa_audit_file(struct aa_profile *profile, struct aa_perms *perms,
return aa_audit(type, profile, &sa, 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, struct aa_label *label,
const struct path *path, int flags, char *buffer,
const char **name, struct path_cond *cond, u32 request)