]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita1928d62f8417b4ad0c83ecc140dd1d82bc38e56
tree0d1ed1dacd98fbc2e12a3e34dd5a60f2eeb9cda7
parent6ff2a03a9a03a0b37626265c912850de439bd480
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