aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Johansen <[email protected]>2007-05-08 00:29:41 -0700
committerLinus Torvalds <[email protected]>2007-05-08 11:15:10 -0700
commit1e8123fdeda6b2b9e96f2ec56e7bed27a303d3eb (patch)
tree5a969db27d16a0dd324277618c519cd98e0c7abe
parent49a4ec188f9a96c9a5567956718213d38a456a19 (diff)
Remove redundant check from proc_setattr()
notify_change() already calls security_inode_setattr() before calling iop->setattr. Signed-off-by: Tony Jones <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]> Signed-off-by: John Johansen <[email protected]> Acked-by: Stephen Smalley <[email protected]> Cc: James Morris <[email protected]> Cc: Chris Wright <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--fs/proc/base.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 0c2052c79243..ff9c131e6b30 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;
}