summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorSergei Trofimovich2012-04-16 05:44:37 +0200
committerDavid Sterba2012-04-18 19:22:26 +0200
commit8a3db1849e9e2563727ea2dc32737502e0096641 (patch)
tree378c3527b32dea43c50a3cd1cf534d7901aab4be /fs/btrfs/super.c
parentBtrfs: fix max chunk size check in chunk allocator (diff)
downloadkernel-qcow2-linux-8a3db1849e9e2563727ea2dc32737502e0096641.tar.gz
kernel-qcow2-linux-8a3db1849e9e2563727ea2dc32737502e0096641.tar.xz
kernel-qcow2-linux-8a3db1849e9e2563727ea2dc32737502e0096641.zip
btrfs: fix early abort in 'remount'
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>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 84571d7da12e..43aa2dd0bc7d 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -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)