Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188238
b: refs/heads/master
c: 8ad6fca
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Mar 18, 2010
1 parent dd3853f commit 7ff0805
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b53ac4d1b75b23bdc2b54ace787b8f718a987ef
refs/heads/master: 8ad6fcab564c5bc956bdc3dfa440ab152b6e780f
9 changes: 6 additions & 3 deletions trunk/fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1147,12 +1147,13 @@ static noinline int btrfs_search_path_in_tree(struct btrfs_fs_info *info,
root = btrfs_read_fs_root_no_name(info, &key);
if (IS_ERR(root)) {
printk(KERN_ERR "could not find root %llu\n", tree_id);
return -ENOENT;
ret = -ENOENT;
goto out;
}

key.objectid = dirid;
key.type = BTRFS_INODE_REF_KEY;
key.offset = 0;
key.offset = (u64)-1;

while(1) {
ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
Expand All @@ -1161,6 +1162,8 @@ static noinline int btrfs_search_path_in_tree(struct btrfs_fs_info *info,

l = path->nodes[0];
slot = path->slots[0];
if (ret > 0 && slot > 0)
slot--;
btrfs_item_key_to_cpu(l, &key, slot);

if (ret > 0 && (key.objectid != dirid ||
Expand All @@ -1184,7 +1187,7 @@ static noinline int btrfs_search_path_in_tree(struct btrfs_fs_info *info,

btrfs_release_path(root, path);
key.objectid = key.offset;
key.offset = 0;
key.offset = (u64)-1;
dirid = key.objectid;

}
Expand Down

0 comments on commit 7ff0805

Please sign in to comment.