diff options
author | David Vrabel <david.vrabel@csr.com> | 2010-02-25 13:35:22 +0000 |
---|---|---|
committer | David Vrabel <david.vrabel@csr.com> | 2010-02-25 13:35:22 +0000 |
commit | 03806fa20f6a081493a731a4b18ea66317f9f947 (patch) | |
tree | 630796c65c501e3612253ee4d4af58082a5f984c /fs/btrfs/disk-io.c | |
parent | 35fb2a816a06ded2a3ff83d896c34b83c8e1d556 (diff) | |
parent | baac35c4155a8aa826c70acee6553368ca5243a2 (diff) | |
download | blackbird-op-linux-03806fa20f6a081493a731a4b18ea66317f9f947.tar.gz blackbird-op-linux-03806fa20f6a081493a731a4b18ea66317f9f947.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream
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 009e3bd18f23..2b59201b955c 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: |