forked from Minki/linux
Remove redundant check from proc_setattr()
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>
This commit is contained in:
parent
49a4ec188f
commit
1e8123fded
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user