Browse Source

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>
John Johansen 18 years ago
parent
commit
1e8123fded
1 changed files with 2 additions and 5 deletions
  1. 2 5
      fs/proc/base.c

+ 2 - 5
fs/proc/base.c

@@ -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) {
-		error = security_inode_setattr(dentry, attr);
-		if (!error)
-			error = inode_setattr(inode, attr);
-	}
+	if (!error)
+		error = inode_setattr(inode, attr);
 	return error;
 	return error;
 }
 }