diff options
Diffstat (limited to 'fs/btrfs/inode-item.c')
-rw-r--r-- | fs/btrfs/inode-item.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/btrfs/inode-item.c b/fs/btrfs/inode-item.c index 48b8fda93132..e0b7034d6343 100644 --- a/fs/btrfs/inode-item.c +++ b/fs/btrfs/inode-item.c | |||
@@ -183,10 +183,11 @@ int btrfs_get_inode_ref_index(struct btrfs_trans_handle *trans, | |||
183 | return -ENOENT; | 183 | return -ENOENT; |
184 | } | 184 | } |
185 | 185 | ||
186 | int btrfs_del_inode_extref(struct btrfs_trans_handle *trans, | 186 | static int btrfs_del_inode_extref(struct btrfs_trans_handle *trans, |
187 | struct btrfs_root *root, | 187 | struct btrfs_root *root, |
188 | const char *name, int name_len, | 188 | const char *name, int name_len, |
189 | u64 inode_objectid, u64 ref_objectid, u64 *index) | 189 | u64 inode_objectid, u64 ref_objectid, |
190 | u64 *index) | ||
190 | { | 191 | { |
191 | struct btrfs_path *path; | 192 | struct btrfs_path *path; |
192 | struct btrfs_key key; | 193 | struct btrfs_key key; |
@@ -246,7 +247,7 @@ int btrfs_del_inode_extref(struct btrfs_trans_handle *trans, | |||
246 | memmove_extent_buffer(leaf, ptr, ptr + del_len, | 247 | memmove_extent_buffer(leaf, ptr, ptr + del_len, |
247 | item_size - (ptr + del_len - item_start)); | 248 | item_size - (ptr + del_len - item_start)); |
248 | 249 | ||
249 | btrfs_truncate_item(trans, root, path, item_size - del_len, 1); | 250 | btrfs_truncate_item(root, path, item_size - del_len, 1); |
250 | 251 | ||
251 | out: | 252 | out: |
252 | btrfs_free_path(path); | 253 | btrfs_free_path(path); |
@@ -309,7 +310,7 @@ int btrfs_del_inode_ref(struct btrfs_trans_handle *trans, | |||
309 | item_start = btrfs_item_ptr_offset(leaf, path->slots[0]); | 310 | item_start = btrfs_item_ptr_offset(leaf, path->slots[0]); |
310 | memmove_extent_buffer(leaf, ptr, ptr + sub_item_len, | 311 | memmove_extent_buffer(leaf, ptr, ptr + sub_item_len, |
311 | item_size - (ptr + sub_item_len - item_start)); | 312 | item_size - (ptr + sub_item_len - item_start)); |
312 | btrfs_truncate_item(trans, root, path, item_size - sub_item_len, 1); | 313 | btrfs_truncate_item(root, path, item_size - sub_item_len, 1); |
313 | out: | 314 | out: |
314 | btrfs_free_path(path); | 315 | btrfs_free_path(path); |
315 | 316 | ||
@@ -361,7 +362,7 @@ static int btrfs_insert_inode_extref(struct btrfs_trans_handle *trans, | |||
361 | name, name_len, NULL)) | 362 | name, name_len, NULL)) |
362 | goto out; | 363 | goto out; |
363 | 364 | ||
364 | btrfs_extend_item(trans, root, path, ins_len); | 365 | btrfs_extend_item(root, path, ins_len); |
365 | ret = 0; | 366 | ret = 0; |
366 | } | 367 | } |
367 | if (ret < 0) | 368 | if (ret < 0) |
@@ -417,7 +418,7 @@ int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans, | |||
417 | goto out; | 418 | goto out; |
418 | 419 | ||
419 | old_size = btrfs_item_size_nr(path->nodes[0], path->slots[0]); | 420 | old_size = btrfs_item_size_nr(path->nodes[0], path->slots[0]); |
420 | btrfs_extend_item(trans, root, path, ins_len); | 421 | btrfs_extend_item(root, path, ins_len); |
421 | ref = btrfs_item_ptr(path->nodes[0], path->slots[0], | 422 | ref = btrfs_item_ptr(path->nodes[0], path->slots[0], |
422 | struct btrfs_inode_ref); | 423 | struct btrfs_inode_ref); |
423 | ref = (struct btrfs_inode_ref *)((unsigned long)ref + old_size); | 424 | ref = (struct btrfs_inode_ref *)((unsigned long)ref + old_size); |