diff options
| -rw-r--r-- | fs/reiserfs/dir.c | 2 | ||||
| -rw-r--r-- | fs/reiserfs/inode.c | 9 | ||||
| -rw-r--r-- | fs/reiserfs/xattr.c | 14 | ||||
| -rw-r--r-- | fs/reiserfs/xattr_acl.c | 3 |
4 files changed, 25 insertions, 3 deletions
diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c index 66c53b642a88..6c2d136561cb 100644 --- a/fs/reiserfs/dir.c +++ b/fs/reiserfs/dir.c | |||
| @@ -204,6 +204,8 @@ int reiserfs_readdir_dentry(struct dentry *dentry, void *dirent, | |||
| 204 | next_pos = deh_offset(deh) + 1; | 204 | next_pos = deh_offset(deh) + 1; |
| 205 | 205 | ||
| 206 | if (item_moved(&tmp_ih, &path_to_entry)) { | 206 | if (item_moved(&tmp_ih, &path_to_entry)) { |
| 207 | set_cpu_key_k_offset(&pos_key, | ||
| 208 | next_pos); | ||
| 207 | goto research; | 209 | goto research; |
| 208 | } | 210 | } |
| 209 | } /* for */ | 211 | } /* for */ |
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 77d6d47abc83..f844533792ee 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
| @@ -1811,11 +1811,16 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, | |||
| 1811 | TYPE_STAT_DATA, SD_SIZE, MAX_US_INT); | 1811 | TYPE_STAT_DATA, SD_SIZE, MAX_US_INT); |
| 1812 | memcpy(INODE_PKEY(inode), &(ih.ih_key), KEY_SIZE); | 1812 | memcpy(INODE_PKEY(inode), &(ih.ih_key), KEY_SIZE); |
| 1813 | args.dirid = le32_to_cpu(ih.ih_key.k_dir_id); | 1813 | args.dirid = le32_to_cpu(ih.ih_key.k_dir_id); |
| 1814 | if (insert_inode_locked4(inode, args.objectid, | 1814 | |
| 1815 | reiserfs_find_actor, &args) < 0) { | 1815 | reiserfs_write_unlock(inode->i_sb); |
| 1816 | err = insert_inode_locked4(inode, args.objectid, | ||
| 1817 | reiserfs_find_actor, &args); | ||
| 1818 | reiserfs_write_lock(inode->i_sb); | ||
| 1819 | if (err) { | ||
| 1816 | err = -EINVAL; | 1820 | err = -EINVAL; |
| 1817 | goto out_bad_inode; | 1821 | goto out_bad_inode; |
| 1818 | } | 1822 | } |
| 1823 | |||
| 1819 | if (old_format_only(sb)) | 1824 | if (old_format_only(sb)) |
| 1820 | /* not a perfect generation count, as object ids can be reused, but | 1825 | /* not a perfect generation count, as object ids can be reused, but |
| 1821 | ** this is as good as reiserfs can do right now. | 1826 | ** this is as good as reiserfs can do right now. |
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 | ||
