Skip to content

Commit

Permalink
apparmor: remove useless checks for NULL ->mnt
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Mar 28, 2016
1 parent d360775 commit 8db0185
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions security/apparmor/lsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 8db0185

Please sign in to comment.