Skip to content

Commit 8ea4690

Browse files
fdmananakdave
authored andcommitted
btrfs: remove duplicated leaf dirty status clearing in __push_leaf_right()
We have already called btrfs_clear_buffer_dirty() against the left leaf in the code above: btrfs_set_header_nritems(left, left_nritems); if (left_nritems) btrfs_mark_buffer_dirty(trans, left); else btrfs_clear_buffer_dirty(trans, left); So remove the second check for a 0 number of items in the left leaf and calling again btrfs_clear_buffer_dirty() against the left leaf. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 5a17fa0 commit 8ea4690

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

fs/btrfs/ctree.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3240,8 +3240,6 @@ static noinline int __push_leaf_right(struct btrfs_trans_handle *trans,
32403240
/* then fixup the leaf pointer in the path */
32413241
if (path->slots[0] >= left_nritems) {
32423242
path->slots[0] -= left_nritems;
3243-
if (btrfs_header_nritems(left) == 0)
3244-
btrfs_clear_buffer_dirty(trans, left);
32453243
btrfs_tree_unlock(left);
32463244
free_extent_buffer(left);
32473245
path->nodes[0] = right;

0 commit comments

Comments
 (0)