aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2007-10-18 06:05:19 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-18 17:37:22 -0400
commitcdd6fe6e2f7eb8e940854317613885c33b1fe584 (patch)
treee255e989145fe0147d602f36cab776864fb512d0 /fs/reiserfs
parent8a0ce7d99a4d19788e017f3138bc59b9962057ae (diff)
reiserfs: turn of ATTR_KILL_S*ID at beginning of reiserfs_setattr
reiserfs_setattr can call notify_change recursively using the same iattr struct. This could cause it to trip the BUG() in notify_change. Fix reiserfs to clear those bits near the beginning of the function. Signed-off-by: Jeff Layton <jlayton@redhat.com> Cc: Chris Mason <chris.mason@oracle.com> Cc: Jeff Mahoney <jeffm@suse.com> Cc: "Vladimir V. Saveliev" <vs@namesys.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/reiserfs')
-rw-r--r--fs/reiserfs/inode.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index 9ea12004fa5..0804289d355 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -3061,7 +3061,11 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr)
3061{ 3061{
3062 struct inode *inode = dentry->d_inode; 3062 struct inode *inode = dentry->d_inode;
3063 int error; 3063 int error;
3064 unsigned int ia_valid = attr->ia_valid; 3064 unsigned int ia_valid;
3065
3066 /* must be turned off for recursive notify_change calls */
3067 ia_valid = attr->ia_valid &= ~(ATTR_KILL_SUID|ATTR_KILL_SGID);
3068
3065 reiserfs_write_lock(inode->i_sb); 3069 reiserfs_write_lock(inode->i_sb);
3066 if (attr->ia_valid & ATTR_SIZE) { 3070 if (attr->ia_valid & ATTR_SIZE) {
3067 /* version 2 items will be caught by the s_maxbytes check 3071 /* version 2 items will be caught by the s_maxbytes check