Two cleanups:
* The data_size is the new added size, not the new size after extend.
Make the description more clear.
* The var data_end is not used anymore after the data shift.
Remove the useless assignment.
Signed-off-by: Wang Sheng-Hui <[email protected]>
---
fs/btrfs/ctree.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index eea5da7..c4f295e 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -4376,7 +4376,8 @@ void btrfs_truncate_item(struct btrfs_trans_handle *trans,
}
/*
- * 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 to be extended size.
*/
void btrfs_extend_item(struct btrfs_trans_handle *trans,
struct btrfs_root *root, struct btrfs_path *path,
@@ -4432,7 +4433,6 @@ void btrfs_extend_item(struct btrfs_trans_handle *trans,
data_end - data_size, btrfs_leaf_data(leaf) +
data_end, old_data - data_end);
- data_end = old_data;
old_size = btrfs_item_size_nr(leaf, slot);
item = btrfs_item_nr(leaf, slot);
btrfs_set_item_size(leaf, item, old_size + data_size);
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html