mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
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 aebd873e8d
("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>
This commit is contained in:
parent
53991aedcd
commit
2f7a29deba
2 changed files with 0 additions and 19 deletions
|
@ -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);
|
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,
|
static int path_name(const char *op, struct aa_label *label,
|
||||||
const struct path *path, int flags, char *buffer,
|
const struct path *path, int flags, char *buffer,
|
||||||
const char **name, struct path_cond *cond, u32 request)
|
const char **name, struct path_cond *cond, u32 request)
|
||||||
|
|
|
@ -1256,12 +1256,6 @@ struct aa_label *aa_label_merge(struct aa_label *a, struct aa_label *b,
|
||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool label_is_visible(struct aa_profile *profile,
|
|
||||||
struct aa_label *label)
|
|
||||||
{
|
|
||||||
return aa_ns_visible(profile->ns, labels_ns(label), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* match a profile and its associated ns component if needed
|
/* match a profile and its associated ns component if needed
|
||||||
* Assumes visibility test has already been done.
|
* Assumes visibility test has already been done.
|
||||||
* If a subns profile is not to be matched should be prescreened with
|
* If a subns profile is not to be matched should be prescreened with
|
||||||
|
|
Loading…
Reference in a new issue