diff options
Diffstat (limited to 'inode-item.c')
-rw-r--r-- | inode-item.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inode-item.c b/inode-item.c index d563d4ee..913b81ad 100644 --- a/inode-item.c +++ b/inode-item.c @@ -128,13 +128,13 @@ int btrfs_lookup_inode(struct btrfs_trans_handle *trans, struct btrfs_root struct btrfs_key found_key; ret = btrfs_search_slot(trans, root, location, path, ins_len, cow); - if (ret > 0 && btrfs_key_type(location) == BTRFS_ROOT_ITEM_KEY && + if (ret > 0 && location->type == BTRFS_ROOT_ITEM_KEY && location->offset == (u64)-1 && path->slots[0] != 0) { slot = path->slots[0] - 1; leaf = path->nodes[0]; btrfs_item_key_to_cpu(leaf, &found_key, slot); if (found_key.objectid == location->objectid && - btrfs_key_type(&found_key) == btrfs_key_type(location)) { + found_key.type == location->type) { path->slots[0]--; return 0; } |