aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2024-12-18 12:59:51 +0000
committerDavid Sterba <dsterba@suse.com>2025-01-13 14:53:20 +0100
commitc9a4390707c8b6a6f022526a5618e76d24bc6cb2 (patch)
treedcbf7dd541f85142e90f96ab708f5ff37e8b6127
parentbtrfs: root-tree: remove unnecessary calls to btrfs_mark_buffer_dirty() (diff)
downloadwireguard-linux-c9a4390707c8b6a6f022526a5618e76d24bc6cb2.tar.xz
wireguard-linux-c9a4390707c8b6a6f022526a5618e76d24bc6cb2.zip
btrfs: uuid-tree: remove unnecessary call to btrfs_mark_buffer_dirty()
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. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--fs/btrfs/uuid-tree.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/uuid-tree.c b/fs/btrfs/uuid-tree.c
index aca2861f2187..17b5e81123a1 100644
--- a/fs/btrfs/uuid-tree.c
+++ b/fs/btrfs/uuid-tree.c
@@ -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;