From: Al Viro Date: Fri, 25 Mar 2016 19:22:49 +0000 (-0400) Subject: apparmor: remove useless checks for NULL ->mnt X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8db0185659c33143915768bdd33fc2fb1b1cbb58;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git apparmor: remove useless checks for NULL ->mnt Signed-off-by: Al Viro --- diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index 7ae540565097..eadaa58bd6fd 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -215,7 +215,7 @@ static int common_perm_rm(int op, const struct path *dir, struct inode *inode = d_backing_inode(dentry); struct path_cond cond = { }; - if (!inode || !dir->mnt || !mediated_filesystem(dentry)) + if (!inode || !mediated_filesystem(dentry)) return 0; cond.uid = inode->i_uid; @@ -239,7 +239,7 @@ static int common_perm_create(int op, const struct path *dir, { struct path_cond cond = { current_fsuid(), mode }; - if (!dir->mnt || !mediated_filesystem(dir->dentry)) + if (!mediated_filesystem(dir->dentry)) return 0; return common_perm_dir_dentry(op, dir, dentry, mask, &cond);