Skip to content

Commit

Permalink
Remove redundant check from proc_setattr()
Browse files Browse the repository at this point in the history
notify_change() already calls security_inode_setattr() before
calling iop->setattr.

Signed-off-by: Tony Jones <tonyj@suse.de>
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: John Johansen <jjohansen@suse.de>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Cc: James Morris <jmorris@namei.org>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
John Johansen authored and Linus Torvalds committed May 8, 2007
1 parent 49a4ec1 commit 1e8123f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,8 @@ static int proc_setattr(struct dentry *dentry, struct iattr *attr)
return -EPERM;

error = inode_change_ok(inode, attr);
if (!error) {
error = security_inode_setattr(dentry, attr);
if (!error)
error = inode_setattr(inode, attr);
}
if (!error)
error = inode_setattr(inode, attr);
return error;
}

Expand Down

0 comments on commit 1e8123f

Please sign in to comment.