summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2014-06-04 12:41:45 -0400
committerChris Mason <clm@fb.com>2014-09-17 16:37:12 -0400
commit962a298f35110edd8f326814ae41a3dd306ecb64 (patch)
tree87849276cdc00964137b4fb663eb54ef1a7eea1d /fs/btrfs/tree-log.c
parent3abdbd780e9d75f0648b8a502c3789857b1e92ce (diff)
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/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index d296efe2d3e7..2f5000c0a87a 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -1498,7 +1498,7 @@ static noinline int link_to_fixup_dir(struct btrfs_trans_handle *trans,
1498 return -EIO; 1498 return -EIO;
1499 1499
1500 key.objectid = BTRFS_TREE_LOG_FIXUP_OBJECTID; 1500 key.objectid = BTRFS_TREE_LOG_FIXUP_OBJECTID;
1501 btrfs_set_key_type(&key, BTRFS_ORPHAN_ITEM_KEY); 1501 key.type = BTRFS_ORPHAN_ITEM_KEY;
1502 key.offset = objectid; 1502 key.offset = objectid;
1503 1503
1504 ret = btrfs_insert_empty_item(trans, root, path, &key, 0); 1504 ret = btrfs_insert_empty_item(trans, root, path, &key, 0);
@@ -3364,7 +3364,7 @@ static noinline int copy_items(struct btrfs_trans_handle *trans,
3364 * or deletes of this inode don't have to relog the inode 3364 * or deletes of this inode don't have to relog the inode
3365 * again 3365 * again
3366 */ 3366 */
3367 if (btrfs_key_type(ins_keys + i) == BTRFS_EXTENT_DATA_KEY && 3367 if (ins_keys[i].type == BTRFS_EXTENT_DATA_KEY &&
3368 !skip_csum) { 3368 !skip_csum) {
3369 int found_type; 3369 int found_type;
3370 extent = btrfs_item_ptr(src, start_slot + i, 3370 extent = btrfs_item_ptr(src, start_slot + i,
@@ -4369,7 +4369,7 @@ int btrfs_recover_log_trees(struct btrfs_root *log_root_tree)
4369again: 4369again:
4370 key.objectid = BTRFS_TREE_LOG_OBJECTID; 4370 key.objectid = BTRFS_TREE_LOG_OBJECTID;
4371 key.offset = (u64)-1; 4371 key.offset = (u64)-1;
4372 btrfs_set_key_type(&key, BTRFS_ROOT_ITEM_KEY); 4372 key.type = BTRFS_ROOT_ITEM_KEY;
4373 4373
4374 while (1) { 4374 while (1) {
4375 ret = btrfs_search_slot(NULL, log_root_tree, &key, path, 0, 0); 4375 ret = btrfs_search_slot(NULL, log_root_tree, &key, path, 0, 0);