]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: introduce btrfs_lookup_match_dir
authorMarcos Paulo de Souza <mpdesouza@suse.com>
Mon, 26 Jul 2021 19:19:09 +0000 (16:19 -0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:19:02 +0000 (13:19 +0200)
commit566bcd5910a781be9e5a2c4aff893c9e27b13095
treee5059036c116515433126cf967152b215431c303
parent9e5ea9741ecea6e631dc3f9222c6b23fa691bb40
btrfs: introduce btrfs_lookup_match_dir

btrfs_search_slot is called in multiple places in dir-item.c to search
for a dir entry, and then calling btrfs_match_dir_name to return a
btrfs_dir_item.

In order to reduce the number of callers of btrfs_search_slot, create a
common function that looks for the dir key, and if found call
btrfs_match_dir_item_name.

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/dir-item.c