diff options
author | John Johansen <john.johansen@canonical.com> | 2017-06-09 20:43:45 +0200 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2017-06-11 02:11:37 +0200 |
commit | 2835a13bbdc09d330eafdf5e67eb407c90c01ab7 (patch) | |
tree | 03a6a71e39a2fcac5c777cbf86928961285302d9 /security/apparmor/lsm.c | |
parent | apparmor: convert aa_change_XXX bool parameters to flags (diff) | |
download | linux-2835a13bbdc09d330eafdf5e67eb407c90c01ab7.tar.xz linux-2835a13bbdc09d330eafdf5e67eb407c90c01ab7.zip |
apparmor: cleanup rename XXX_file_context() to XXX_file_ctx()
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/lsm.c')
-rw-r--r-- | security/apparmor/lsm.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index e07dd5a204d7..3c6fa9753675 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -398,9 +398,9 @@ static int apparmor_file_alloc_security(struct file *file) /* freed by apparmor_file_free_security */ struct aa_profile *profile = begin_current_profile_crit_section(); - file->f_security = aa_alloc_file_context(GFP_KERNEL); - if (!file->f_security) - return -ENOMEM; + file->f_security = aa_alloc_file_ctx(GFP_KERNEL); + if (!file_ctx(file)) + error = -ENOMEM; end_current_profile_crit_section(profile); return error; @@ -408,9 +408,7 @@ static int apparmor_file_alloc_security(struct file *file) static void apparmor_file_free_security(struct file *file) { - struct aa_file_ctx *ctx = file->f_security; - - aa_free_file_context(ctx); + aa_free_file_ctx(file_ctx(file)); } static int common_file_perm(const char *op, struct file *file, u32 mask) |