btrfs: pass NULL as trans to btrfs_search_slot if we only want to search
authorMarcos Paulo de Souza <mpdesouza@suse.com>
Tue, 20 Jul 2021 18:02:47 +0000 (15:02 -0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:19:00 +0000 (13:19 +0200)
commit6534c0c99dddafc47bd4152949751ccd6a5681fc
tree0d1ed1dacd98fbc2e12a3e34dd5a60f2eeb9cda7
parent069a2e37789a9adb236d8f7a5f65a1390b51f184
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>
fs/btrfs/backref.c
fs/btrfs/extent-tree.c