summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2012-04-16 06:44:37 +0300
committerDavid Sterba <dsterba@suse.cz>2012-04-18 19:22:26 +0200
commit8a3db1849e9e2563727ea2dc32737502e0096641 (patch)
tree378c3527b32dea43c50a3cd1cf534d7901aab4be /fs
parent37db63a400d3bac467795aa43901065fd8d903b7 (diff)
downloadlinux-stable-8a3db1849e9e2563727ea2dc32737502e0096641.tar.gz
linux-stable-8a3db1849e9e2563727ea2dc32737502e0096641.tar.bz2
linux-stable-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')
-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)