]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/btrfs/ioctl.c
Btrfs: allow treeid==0 in the inode lookup ioctl
[mv-sheeva.git] / fs / btrfs / ioctl.c
index fd757f5769562cb33ca68c695a361e09cb916c2b..1e462de6556e21ea37802fab6588f2e65177bfa5 100644 (file)
@@ -1215,6 +1215,9 @@ static noinline int btrfs_ioctl_ino_lookup(struct file *file,
        }
        inode = fdentry(file)->d_inode;
 
+       if (args->treeid == 0)
+               args->treeid = BTRFS_I(inode)->root->root_key.objectid;
+
        ret = btrfs_search_path_in_tree(BTRFS_I(inode)->root->fs_info,
                                        args->treeid, args->objectid,
                                        args->name);