- if (namelen == 2 && strcmp(name, "..") == 0) {
- struct btrfs_key key;
- struct extent_buffer *leaf;
- int slot;
-
- key.objectid = dir->i_ino;
- key.offset = (u64)-1;
- btrfs_set_key_type(&key, BTRFS_INODE_REF_KEY);
- if (ret < 0 || path->slots[0] == 0)
- goto out_err;
- ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
- BUG_ON(ret == 0);
- ret = 0;
- leaf = path->nodes[0];
- slot = path->slots[0] - 1;
-
- btrfs_item_key_to_cpu(leaf, &key, slot);
- if (key.objectid != dir->i_ino ||
- key.type != BTRFS_INODE_REF_KEY) {
- goto out_err;
- }
- location->objectid = key.offset;
- location->type = BTRFS_INODE_ITEM_KEY;
- location->offset = 0;
- goto out;
- }
-