Skip to content

Commit 8a3db18

Browse files
Sergei Trofimovichkdave
authored andcommitted
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>
1 parent 37db63a commit 8a3db18

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

fs/btrfs/super.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,13 +1152,15 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data)
11521152
if (ret)
11531153
goto restore;
11541154
} else {
1155-
if (fs_info->fs_devices->rw_devices == 0)
1155+
if (fs_info->fs_devices->rw_devices == 0) {
11561156
ret = -EACCES;
11571157
goto restore;
1158+
}
11581159

1159-
if (btrfs_super_log_root(fs_info->super_copy) != 0)
1160+
if (btrfs_super_log_root(fs_info->super_copy) != 0) {
11601161
ret = -EINVAL;
11611162
goto restore;
1163+
}
11621164

11631165
ret = btrfs_cleanup_fs_roots(fs_info);
11641166
if (ret)

0 commit comments

Comments
 (0)