diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-19 13:14:34 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-19 13:14:34 -0700 |
commit | f7a0fd56e4f58aec3300082fc10433052e2f1863 (patch) | |
tree | 4b3348f4866f6b3417f456a298229d63d4581424 /fs/btrfs/disk-io.c | |
parent | 5e1e704a7de14ae79dc4d983dbbcab67064960c9 (diff) | |
parent | 31d141e3a666269a3b6fcccddb0351caf7454240 (diff) | |
download | talos-obmc-linux-f7a0fd56e4f58aec3300082fc10433052e2f1863.tar.gz talos-obmc-linux-f7a0fd56e4f58aec3300082fc10433052e2f1863.zip |
Merge 3.12-rc6 into staging-next.
We want these fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 4ae17ed13b32..62176ad89846 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1561,8 +1561,9 @@ int btrfs_insert_fs_root(struct btrfs_fs_info *fs_info, return ret; } -struct btrfs_root *btrfs_read_fs_root_no_name(struct btrfs_fs_info *fs_info, - struct btrfs_key *location) +struct btrfs_root *btrfs_get_fs_root(struct btrfs_fs_info *fs_info, + struct btrfs_key *location, + bool check_ref) { struct btrfs_root *root; int ret; @@ -1586,7 +1587,7 @@ struct btrfs_root *btrfs_read_fs_root_no_name(struct btrfs_fs_info *fs_info, again: root = btrfs_lookup_fs_root(fs_info, location->objectid); if (root) { - if (btrfs_root_refs(&root->root_item) == 0) + if (check_ref && btrfs_root_refs(&root->root_item) == 0) return ERR_PTR(-ENOENT); return root; } @@ -1595,7 +1596,7 @@ again: if (IS_ERR(root)) return root; - if (btrfs_root_refs(&root->root_item) == 0) { + if (check_ref && btrfs_root_refs(&root->root_item) == 0) { ret = -ENOENT; goto fail; } |