btrfs: fix early abort in 'remount'
authorSergei Trofimovich <slyfox@gentoo.org>
Mon, 16 Apr 2012 03:44:37 +0000 (06:44 +0300)
committerDavid Sterba <dsterba@suse.cz>
Wed, 18 Apr 2012 17:22:26 +0000 (19:22 +0200)
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Josef Bacik <josef@redhat.com>
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
fs/btrfs/super.c

index 84571d7da12e93d76537c52653891287b6683497..43aa2dd0bc7dd7dde27bceed413c933a409f73df 100644 (file)
@@ -1152,13 +1152,15 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data)
                if (ret)
                        goto restore;
        } else {
-               if (fs_info->fs_devices->rw_devices == 0)
+               if (fs_info->fs_devices->rw_devices == 0) {
                        ret = -EACCES;
                        goto restore;
+               }
 
-               if (btrfs_super_log_root(fs_info->super_copy) != 0)
+               if (btrfs_super_log_root(fs_info->super_copy) != 0) {
                        ret = -EINVAL;
                        goto restore;
+               }
 
                ret = btrfs_cleanup_fs_roots(fs_info);
                if (ret)