diff options
| author | Sergei Trofimovich <slyfox@gentoo.org> | 2012-04-15 23:44:37 -0400 |
|---|---|---|
| committer | David Sterba <dsterba@suse.cz> | 2012-04-18 13:22:26 -0400 |
| commit | 8a3db1849e9e2563727ea2dc32737502e0096641 (patch) | |
| tree | 378c3527b32dea43c50a3cd1cf534d7901aab4be /fs | |
| parent | 37db63a400d3bac467795aa43901065fd8d903b7 (diff) | |
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.c | 6 |
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) | |||
| 1152 | if (ret) | 1152 | if (ret) |
| 1153 | goto restore; | 1153 | goto restore; |
| 1154 | } else { | 1154 | } else { |
| 1155 | if (fs_info->fs_devices->rw_devices == 0) | 1155 | if (fs_info->fs_devices->rw_devices == 0) { |
| 1156 | ret = -EACCES; | 1156 | ret = -EACCES; |
| 1157 | goto restore; | 1157 | goto restore; |
| 1158 | } | ||
| 1158 | 1159 | ||
| 1159 | if (btrfs_super_log_root(fs_info->super_copy) != 0) | 1160 | if (btrfs_super_log_root(fs_info->super_copy) != 0) { |
| 1160 | ret = -EINVAL; | 1161 | ret = -EINVAL; |
| 1161 | goto restore; | 1162 | goto restore; |
| 1163 | } | ||
| 1162 | 1164 | ||
| 1163 | ret = btrfs_cleanup_fs_roots(fs_info); | 1165 | ret = btrfs_cleanup_fs_roots(fs_info); |
| 1164 | if (ret) | 1166 | if (ret) |
