Remove redundant check from proc_setattr()
authorJohn Johansen <jjohansen@suse.de>
Tue, 8 May 2007 07:29:41 +0000 (00:29 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:10 +0000 (11:15 -0700)
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>
fs/proc/base.c

index 0c2052c..ff9c131 100644 (file)
@@ -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;
 }