Skip to content

Commit

Permalink
btrfs: fix early abort in 'remount'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sergei Trofimovich authored and David Sterba committed Apr 18, 2012
1 parent 37db63a commit 8a3db18
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8a3db18

Please sign in to comment.