btrfs: kill the key type accessor helpers
btrfs_set_key_type and btrfs_key_type are used inconsistently along with open coded variants. Other members of btrfs_key are accessed directly without any helpers anyway. Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:

committed by
Chris Mason

parent
3abdbd780e
commit
962a298f35
@@ -1193,7 +1193,7 @@ int btrfs_find_one_extref(struct btrfs_root *root, u64 inode_objectid,
|
||||
unsigned long ptr;
|
||||
|
||||
key.objectid = inode_objectid;
|
||||
btrfs_set_key_type(&key, BTRFS_INODE_EXTREF_KEY);
|
||||
key.type = BTRFS_INODE_EXTREF_KEY;
|
||||
key.offset = start_off;
|
||||
|
||||
ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
|
||||
@@ -1233,7 +1233,7 @@ int btrfs_find_one_extref(struct btrfs_root *root, u64 inode_objectid,
|
||||
ret = -ENOENT;
|
||||
if (found_key.objectid != inode_objectid)
|
||||
break;
|
||||
if (btrfs_key_type(&found_key) != BTRFS_INODE_EXTREF_KEY)
|
||||
if (found_key.type != BTRFS_INODE_EXTREF_KEY)
|
||||
break;
|
||||
|
||||
ret = 0;
|
||||
|
Reference in New Issue
Block a user