diff options
author | Marcos Paulo de Souza <mpdesouza@suse.com> | 2021-07-20 15:02:47 -0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-08-23 13:19:00 +0200 |
commit | 6534c0c99dddafc47bd4152949751ccd6a5681fc (patch) | |
tree | 0d1ed1dacd98fbc2e12a3e34dd5a60f2eeb9cda7 /fs/btrfs/extent-tree.c | |
parent | 069a2e37789a9adb236d8f7a5f65a1390b51f184 (diff) | |
download | lwn-6534c0c99dddafc47bd4152949751ccd6a5681fc.tar.gz lwn-6534c0c99dddafc47bd4152949751ccd6a5681fc.zip |
btrfs: pass NULL as trans to btrfs_search_slot if we only want to search
Using a transaction in btrfs_search_slot is only useful when we are
searching to add or modify the tree. When the function is used for
searching, insert length and mod arguments are 0, there is no need to
use a transaction.
No functional changes, changing for consistency.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index d5925bebd379..fc3da7585fb7 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -153,7 +153,7 @@ search_again: else key.type = BTRFS_EXTENT_ITEM_KEY; - ret = btrfs_search_slot(trans, fs_info->extent_root, &key, path, 0, 0); + ret = btrfs_search_slot(NULL, fs_info->extent_root, &key, path, 0, 0); if (ret < 0) goto out_free; |