Ilya Dryomov
2012-Jun-22 18:14 UTC
[PATCH] Btrfs: do not ignore errors from btrfs_cleanup_fs_roots() when mounting
There used to be a BUG_ON(ret) there before EH patch (79787eaa) went in.
Bail out with EINVAL.
Cc: David Sterba <dsterba@suse.cz>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
---
fs/btrfs/disk-io.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index f06db81..77872da 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2461,8 +2461,8 @@ retry_root_backup:
if (!(sb->s_flags & MS_RDONLY)) {
ret = btrfs_cleanup_fs_roots(fs_info);
- if (ret) {
- }
+ if (ret)
+ goto fail_trans_kthread;
ret = btrfs_recover_relocation(tree_root);
if (ret < 0) {
--
1.7.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
David Sterba
2012-Jun-25 12:10 UTC
Re: [PATCH] Btrfs: do not ignore errors from btrfs_cleanup_fs_roots() when mounting
On Fri, Jun 22, 2012 at 09:14:13PM +0300, Ilya Dryomov wrote:> There used to be a BUG_ON(ret) there before EH patch (79787eaa) went in. > Bail out with EINVAL. > > Cc: David Sterba <dsterba@suse.cz> > Signed-off-by: Ilya Dryomov <idryomov@gmail.com> > --- > fs/btrfs/disk-io.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c > index f06db81..77872da 100644 > --- a/fs/btrfs/disk-io.c > +++ b/fs/btrfs/disk-io.c > @@ -2461,8 +2461,8 @@ retry_root_backup: > > if (!(sb->s_flags & MS_RDONLY)) { > ret = btrfs_cleanup_fs_roots(fs_info); > - if (ret) { > - } > + if (ret) > + goto fail_trans_kthread;Oh, right of course. Thanks. david -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html