Commit 4b90c680 authored by Tsutomu Itoh's avatar Tsutomu Itoh Committed by Josef Bacik

Btrfs: remove unused argument of btrfs_extend_item()

Argument 'trans' is not used in btrfs_extend_item().
Signed-off-by: default avatarTsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
parent afe5fea7
...@@ -4383,8 +4383,7 @@ void btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path, ...@@ -4383,8 +4383,7 @@ void btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path,
/* /*
* make the item pointed to by the path bigger, data_size is the new size. * make the item pointed to by the path bigger, data_size is the new size.
*/ */
void btrfs_extend_item(struct btrfs_trans_handle *trans, void btrfs_extend_item(struct btrfs_root *root, struct btrfs_path *path,
struct btrfs_root *root, struct btrfs_path *path,
u32 data_size) u32 data_size)
{ {
int slot; int slot;
......
...@@ -3219,8 +3219,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans, ...@@ -3219,8 +3219,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,
struct extent_buffer **cow_ret, u64 new_root_objectid); struct extent_buffer **cow_ret, u64 new_root_objectid);
int btrfs_block_can_be_shared(struct btrfs_root *root, int btrfs_block_can_be_shared(struct btrfs_root *root,
struct extent_buffer *buf); struct extent_buffer *buf);
void btrfs_extend_item(struct btrfs_trans_handle *trans, void btrfs_extend_item(struct btrfs_root *root, struct btrfs_path *path,
struct btrfs_root *root, struct btrfs_path *path,
u32 data_size); u32 data_size);
void btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path, void btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path,
u32 new_size, int from_end); u32 new_size, int from_end);
......
...@@ -49,7 +49,7 @@ static struct btrfs_dir_item *insert_with_overflow(struct btrfs_trans_handle ...@@ -49,7 +49,7 @@ static struct btrfs_dir_item *insert_with_overflow(struct btrfs_trans_handle
di = btrfs_match_dir_item_name(root, path, name, name_len); di = btrfs_match_dir_item_name(root, path, name, name_len);
if (di) if (di)
return ERR_PTR(-EEXIST); return ERR_PTR(-EEXIST);
btrfs_extend_item(trans, root, path, data_size); btrfs_extend_item(root, path, data_size);
} else if (ret < 0) } else if (ret < 0)
return ERR_PTR(ret); return ERR_PTR(ret);
WARN_ON(ret > 0); WARN_ON(ret > 0);
......
...@@ -1035,7 +1035,7 @@ static int convert_extent_item_v0(struct btrfs_trans_handle *trans, ...@@ -1035,7 +1035,7 @@ static int convert_extent_item_v0(struct btrfs_trans_handle *trans,
return ret; return ret;
BUG_ON(ret); /* Corruption */ BUG_ON(ret); /* Corruption */
btrfs_extend_item(trans, root, path, new_size); btrfs_extend_item(root, path, new_size);
leaf = path->nodes[0]; leaf = path->nodes[0];
item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item);
...@@ -1683,7 +1683,7 @@ void setup_inline_extent_backref(struct btrfs_trans_handle *trans, ...@@ -1683,7 +1683,7 @@ void setup_inline_extent_backref(struct btrfs_trans_handle *trans,
type = extent_ref_type(parent, owner); type = extent_ref_type(parent, owner);
size = btrfs_extent_inline_ref_size(type); size = btrfs_extent_inline_ref_size(type);
btrfs_extend_item(trans, root, path, size); btrfs_extend_item(root, path, size);
ei = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); ei = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item);
refs = btrfs_extent_refs(leaf, ei); refs = btrfs_extent_refs(leaf, ei);
......
...@@ -841,7 +841,7 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans, ...@@ -841,7 +841,7 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
diff /= csum_size; diff /= csum_size;
diff *= csum_size; diff *= csum_size;
btrfs_extend_item(trans, root, path, diff); btrfs_extend_item(root, path, diff);
goto csum; goto csum;
} }
......
...@@ -361,7 +361,7 @@ static int btrfs_insert_inode_extref(struct btrfs_trans_handle *trans, ...@@ -361,7 +361,7 @@ static int btrfs_insert_inode_extref(struct btrfs_trans_handle *trans,
name, name_len, NULL)) name, name_len, NULL))
goto out; goto out;
btrfs_extend_item(trans, root, path, ins_len); btrfs_extend_item(root, path, ins_len);
ret = 0; ret = 0;
} }
if (ret < 0) if (ret < 0)
...@@ -417,7 +417,7 @@ int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans, ...@@ -417,7 +417,7 @@ int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans,
goto out; goto out;
old_size = btrfs_item_size_nr(path->nodes[0], path->slots[0]); old_size = btrfs_item_size_nr(path->nodes[0], path->slots[0]);
btrfs_extend_item(trans, root, path, ins_len); btrfs_extend_item(root, path, ins_len);
ref = btrfs_item_ptr(path->nodes[0], path->slots[0], ref = btrfs_item_ptr(path->nodes[0], path->slots[0],
struct btrfs_inode_ref); struct btrfs_inode_ref);
ref = (struct btrfs_inode_ref *)((unsigned long)ref + old_size); ref = (struct btrfs_inode_ref *)((unsigned long)ref + old_size);
......
...@@ -410,7 +410,7 @@ static noinline int overwrite_item(struct btrfs_trans_handle *trans, ...@@ -410,7 +410,7 @@ static noinline int overwrite_item(struct btrfs_trans_handle *trans,
if (found_size > item_size) if (found_size > item_size)
btrfs_truncate_item(root, path, item_size, 1); btrfs_truncate_item(root, path, item_size, 1);
else if (found_size < item_size) else if (found_size < item_size)
btrfs_extend_item(trans, root, path, btrfs_extend_item(root, path,
item_size - found_size); item_size - found_size);
} else if (ret) { } else if (ret) {
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment