btrfs: expand btrfs_find_item if found_key is NULL
If the found_key is NULL, then btrfs_find_item becomes a verbose wrapper for simple btrfs_search_slot. After we've removed all such callers, passing a NULL key is not valid anymore. Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
@@ -2618,13 +2618,14 @@ int btrfs_find_item(struct btrfs_root *fs_root, struct btrfs_path *path,
|
||||
struct extent_buffer *eb;
|
||||
|
||||
ASSERT(path);
|
||||
ASSERT(found_key);
|
||||
|
||||
key.type = key_type;
|
||||
key.objectid = iobjectid;
|
||||
key.offset = ioff;
|
||||
|
||||
ret = btrfs_search_slot(NULL, fs_root, &key, path, 0, 0);
|
||||
if ((ret < 0) || (found_key == NULL))
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
eb = path->nodes[0];
|
||||
|
Reference in New Issue
Block a user