diff options
author | Gleb Natapov <gleb@redhat.com> | 2013-10-17 10:04:47 -0400 |
---|---|---|
committer | Gleb Natapov <gleb@redhat.com> | 2013-10-17 10:41:49 -0400 |
commit | 13acfd5715144518232d8e29acf7c76ef1b089d8 (patch) | |
tree | 093c4311a737210bbdd3d1919f8193cb5f017241 /fs/btrfs/disk-io.c | |
parent | d570142674890fe10b3d7d86aa105e3dfce1ddfa (diff) | |
parent | 34ec4de42be5006abdd8d0c08b306ffaa64d0d5d (diff) |
Powerpc KVM work is based on a commit after rc4.
Merging master into next to satisfy the dependencies.
Conflicts:
arch/arm/kvm/reset.c
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, | |||
1561 | return ret; | 1561 | return ret; |
1562 | } | 1562 | } |
1563 | 1563 | ||
1564 | struct btrfs_root *btrfs_read_fs_root_no_name(struct btrfs_fs_info *fs_info, | 1564 | struct btrfs_root *btrfs_get_fs_root(struct btrfs_fs_info *fs_info, |
1565 | struct btrfs_key *location) | 1565 | struct btrfs_key *location, |
1566 | bool check_ref) | ||
1566 | { | 1567 | { |
1567 | struct btrfs_root *root; | 1568 | struct btrfs_root *root; |
1568 | int ret; | 1569 | int ret; |
@@ -1586,7 +1587,7 @@ struct btrfs_root *btrfs_read_fs_root_no_name(struct btrfs_fs_info *fs_info, | |||
1586 | again: | 1587 | again: |
1587 | root = btrfs_lookup_fs_root(fs_info, location->objectid); | 1588 | root = btrfs_lookup_fs_root(fs_info, location->objectid); |
1588 | if (root) { | 1589 | if (root) { |
1589 | if (btrfs_root_refs(&root->root_item) == 0) | 1590 | if (check_ref && btrfs_root_refs(&root->root_item) == 0) |
1590 | return ERR_PTR(-ENOENT); | 1591 | return ERR_PTR(-ENOENT); |
1591 | return root; | 1592 | return root; |
1592 | } | 1593 | } |
@@ -1595,7 +1596,7 @@ again: | |||
1595 | if (IS_ERR(root)) | 1596 | if (IS_ERR(root)) |
1596 | return root; | 1597 | return root; |
1597 | 1598 | ||
1598 | if (btrfs_root_refs(&root->root_item) == 0) { | 1599 | if (check_ref && btrfs_root_refs(&root->root_item) == 0) { |
1599 | ret = -ENOENT; | 1600 | ret = -ENOENT; |
1600 | goto fail; | 1601 | goto fail; |
1601 | } | 1602 | } |