diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/reiserfs/xattr.c | 14 | ||||
-rw-r--r-- | fs/reiserfs/xattr_acl.c | 3 |
2 files changed, 16 insertions, 1 deletions
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 4cce1d9552fb..821bcf70e467 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c | |||
@@ -318,7 +318,19 @@ static int delete_one_xattr(struct dentry *dentry, void *data) | |||
318 | static int chown_one_xattr(struct dentry *dentry, void *data) | 318 | static int chown_one_xattr(struct dentry *dentry, void *data) |
319 | { | 319 | { |
320 | struct iattr *attrs = data; | 320 | struct iattr *attrs = data; |
321 | return reiserfs_setattr(dentry, attrs); | 321 | int ia_valid = attrs->ia_valid; |
322 | int err; | ||
323 | |||
324 | /* | ||
325 | * We only want the ownership bits. Otherwise, we'll do | ||
326 | * things like change a directory to a regular file if | ||
327 | * ATTR_MODE is set. | ||
328 | */ | ||
329 | attrs->ia_valid &= (ATTR_UID|ATTR_GID); | ||
330 | err = reiserfs_setattr(dentry, attrs); | ||
331 | attrs->ia_valid = ia_valid; | ||
332 | |||
333 | return err; | ||
322 | } | 334 | } |
323 | 335 | ||
324 | /* No i_mutex, but the inode is unconnected. */ | 336 | /* No i_mutex, but the inode is unconnected. */ |
diff --git a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c index d7c01ef64eda..6c8767fdfc6a 100644 --- a/fs/reiserfs/xattr_acl.c +++ b/fs/reiserfs/xattr_acl.c | |||
@@ -443,6 +443,9 @@ int reiserfs_acl_chmod(struct inode *inode) | |||
443 | int depth; | 443 | int depth; |
444 | int error; | 444 | int error; |
445 | 445 | ||
446 | if (IS_PRIVATE(inode)) | ||
447 | return 0; | ||
448 | |||
446 | if (S_ISLNK(inode->i_mode)) | 449 | if (S_ISLNK(inode->i_mode)) |
447 | return -EOPNOTSUPP; | 450 | return -EOPNOTSUPP; |
448 | 451 | ||