apparmor: remove useless checks for NULL ->mnt
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 25 Mar 2016 19:22:49 +0000 (15:22 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 28 Mar 2016 04:47:28 +0000 (00:47 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
security/apparmor/lsm.c

index 7ae5405650974fbdfee48609e69510f5f6001ba3..eadaa58bd6fdd9168e0ffab02280f2f3e3867e13 100644 (file)
@@ -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);