diff options
author | Tony Lindgren <tony@atomide.com> | 2010-02-11 02:18:13 (GMT) |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-02-11 02:18:13 (GMT) |
commit | 0482e3c6f704d25b6a4e3c940caeeacece4e6d74 (patch) | |
tree | a8506b9b15ed9a31c2171fc7b461ef52453307b0 /fs/btrfs/disk-io.c | |
parent | 9ba874506b7b3883d78b8cad61eba39c4bb09885 (diff) | |
parent | a6c7fdd29350a74ba5f76809436de9c3d6763009 (diff) | |
download | linux-fsl-qoriq-0482e3c6f704d25b6a4e3c940caeeacece4e6d74.tar.xz |
Merge branch 'omap-fixes-for-linus' into omap-for-linus
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 009e3bd..2b59201 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1982,7 +1982,12 @@ struct btrfs_root *open_ctree(struct super_block *sb, if (!(sb->s_flags & MS_RDONLY)) { ret = btrfs_recover_relocation(tree_root); - BUG_ON(ret); + if (ret < 0) { + printk(KERN_WARNING + "btrfs: failed to recover relocation\n"); + err = -EINVAL; + goto fail_trans_kthread; + } } location.objectid = BTRFS_FS_TREE_OBJECTID; @@ -1993,6 +1998,12 @@ struct btrfs_root *open_ctree(struct super_block *sb, if (!fs_info->fs_root) goto fail_trans_kthread; + if (!(sb->s_flags & MS_RDONLY)) { + down_read(&fs_info->cleanup_work_sem); + btrfs_orphan_cleanup(fs_info->fs_root); + up_read(&fs_info->cleanup_work_sem); + } + return tree_root; fail_trans_kthread: |