summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorDavid Sterba2014-06-04 18:41:45 +0200
committerChris Mason2014-09-17 22:37:12 +0200
commit962a298f35110edd8f326814ae41a3dd306ecb64 (patch)
tree87849276cdc00964137b4fb663eb54ef1a7eea1d /fs/btrfs/file.c
parentbtrfs: make close_ctree return void (diff)
downloadkernel-qcow2-linux-962a298f35110edd8f326814ae41a3dd306ecb64.tar.gz
kernel-qcow2-linux-962a298f35110edd8f326814ae41a3dd306ecb64.tar.xz
kernel-qcow2-linux-962a298f35110edd8f326814ae41a3dd306ecb64.zip
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>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index ff1cc0399b9a..a9b56e32dd8d 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -299,7 +299,7 @@ static int __btrfs_run_defrag_inode(struct btrfs_fs_info *fs_info,
/* get the inode */
key.objectid = defrag->root;
- btrfs_set_key_type(&key, BTRFS_ROOT_ITEM_KEY);
+ key.type = BTRFS_ROOT_ITEM_KEY;
key.offset = (u64)-1;
index = srcu_read_lock(&fs_info->subvol_srcu);
@@ -311,7 +311,7 @@ static int __btrfs_run_defrag_inode(struct btrfs_fs_info *fs_info,
}
key.objectid = defrag->ino;
- btrfs_set_key_type(&key, BTRFS_INODE_ITEM_KEY);
+ key.type = BTRFS_INODE_ITEM_KEY;
key.offset = 0;
inode = btrfs_iget(fs_info->sb, &key, inode_root, NULL);
if (IS_ERR(inode)) {