Commit bfaa324e authored by Nathan Chancellor's avatar Nathan Chancellor Committed by David Sterba

btrfs: remove total_data_size variable in btrfs_batch_insert_items()

clang warns:

  fs/btrfs/delayed-inode.c:684:6: warning: variable 'total_data_size' set
  but not used [-Wunused-but-set-variable]
	  int total_data_size = 0, total_size = 0;
	      ^
  1 warning generated.

This variable's value has been unused since commit fc0d82e1 ("btrfs:
sink total_data parameter in setup_items_for_insert"). Eliminate it.

Link: https://github.com/ClangBuiltLinux/linux/issues/1391Reviewed-by: default avatarNikolay Borisov <nborisov@suse.com>
Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 77d25534
...@@ -681,7 +681,7 @@ static int btrfs_batch_insert_items(struct btrfs_root *root, ...@@ -681,7 +681,7 @@ static int btrfs_batch_insert_items(struct btrfs_root *root,
{ {
struct btrfs_delayed_item *curr, *next; struct btrfs_delayed_item *curr, *next;
int free_space; int free_space;
int total_data_size = 0, total_size = 0; int total_size = 0;
struct extent_buffer *leaf; struct extent_buffer *leaf;
char *data_ptr; char *data_ptr;
struct btrfs_key *keys; struct btrfs_key *keys;
...@@ -706,7 +706,6 @@ static int btrfs_batch_insert_items(struct btrfs_root *root, ...@@ -706,7 +706,6 @@ static int btrfs_batch_insert_items(struct btrfs_root *root,
*/ */
while (total_size + next->data_len + sizeof(struct btrfs_item) <= while (total_size + next->data_len + sizeof(struct btrfs_item) <=
free_space) { free_space) {
total_data_size += next->data_len;
total_size += next->data_len + sizeof(struct btrfs_item); total_size += next->data_len + sizeof(struct btrfs_item);
list_add_tail(&next->tree_list, &head); list_add_tail(&next->tree_list, &head);
nitems++; nitems++;
......
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