From: John Johansen Date: Tue, 8 May 2007 07:29:41 +0000 (-0700) Subject: Remove redundant check from proc_setattr() X-Git-Tag: v2.6.22-rc1~661 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=1e8123fdeda6b2b9e96f2ec56e7bed27a303d3eb;p=~shefty%2Frdma-dev.git Remove redundant check from proc_setattr() notify_change() already calls security_inode_setattr() before calling iop->setattr. Signed-off-by: Tony Jones Signed-off-by: Andreas Gruenbacher Signed-off-by: John Johansen Acked-by: Stephen Smalley Cc: James Morris Cc: Chris Wright Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/base.c b/fs/proc/base.c index 0c2052c7924..ff9c131e6b3 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -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; }