aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2011-06-13 11:28:50 -0400
committerChris Mason <chris.mason@oracle.com>2011-06-13 11:28:50 -0400
commitac08aedfa5d3de0dcb3825b598d16c2e57991f54 (patch)
treec5b72fd5837524e60e14d0f3dfd4afc67b53c4da /fs/btrfs
parent30b4caf5d73af5c99cf1b2b46496d8bc35330992 (diff)
Btrfs: check the return value from set_anon_super
Al Viro noticed we weren't checking for set_anon_super failures. This adds the required checks. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/disk-io.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 9f68c689865..20c111b3fa0 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1312,7 +1312,9 @@ again:
spin_lock_init(&root->cache_lock);
init_waitqueue_head(&root->cache_wait);
- set_anon_super(&root->anon_super, NULL);
+ ret = set_anon_super(&root->anon_super, NULL);
+ if (ret)
+ goto fail;
if (btrfs_root_refs(&root->root_item) == 0) {
ret = -ENOENT;