Skip to content

Commit

Permalink
btrfs: uuid-tree: remove unnecessary call to btrfs_mark_buffer_dirty()
Browse files Browse the repository at this point in the history
The call to btrfs_mark_buffer_dirty() at btrfs_uuid_tree_add() is not
necessary as we have a path setup for writing with btrfs_search_slot()
having a 'cow' argument set to 1 (through btrfs_insert_empty_item()).

This just makes the code more verbose, confusing and add a little extra
overhead and well as increase the module's text size, so remove it.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
fdmanana authored and kdave committed Jan 6, 2025
1 parent b8fef75 commit c3bb16b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/btrfs/uuid-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ int btrfs_uuid_tree_add(struct btrfs_trans_handle *trans, const u8 *uuid, u8 typ
ret = 0;
subid_le = cpu_to_le64(subid_cpu);
write_extent_buffer(eb, &subid_le, offset, sizeof(subid_le));
btrfs_mark_buffer_dirty(trans, eb);

out:
btrfs_free_path(path);
return ret;
Expand Down

0 comments on commit c3bb16b

Please sign in to comment.