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:
John Johansen 2007-05-08 00:29:41 -07:00 committed by Linus Torvalds
parent 49a4ec188f
commit 1e8123fded

View File

@ -347,11 +347,8 @@ static int proc_setattr(struct dentry *dentry, struct iattr *attr)
return -EPERM; return -EPERM;
error = inode_change_ok(inode, attr); error = inode_change_ok(inode, attr);
if (!error) { if (!error)
error = security_inode_setattr(dentry, attr); error = inode_setattr(inode, attr);
if (!error)
error = inode_setattr(inode, attr);
}
return error; return error;
} }