diff options
Diffstat (limited to 'fs/ext2/super.c')
-rw-r--r-- | fs/ext2/super.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 71e9eb1fa696..73346de9af5c 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c | |||
@@ -1241,6 +1241,7 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data) | |||
1241 | spin_unlock(&sbi->s_lock); | 1241 | spin_unlock(&sbi->s_lock); |
1242 | return 0; | 1242 | return 0; |
1243 | } | 1243 | } |
1244 | |||
1244 | /* | 1245 | /* |
1245 | * OK, we are remounting a valid rw partition rdonly, so set | 1246 | * OK, we are remounting a valid rw partition rdonly, so set |
1246 | * the rdonly flag and then mark the partition as valid again. | 1247 | * the rdonly flag and then mark the partition as valid again. |
@@ -1248,6 +1249,14 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data) | |||
1248 | es->s_state = cpu_to_le16(sbi->s_mount_state); | 1249 | es->s_state = cpu_to_le16(sbi->s_mount_state); |
1249 | es->s_mtime = cpu_to_le32(get_seconds()); | 1250 | es->s_mtime = cpu_to_le32(get_seconds()); |
1250 | spin_unlock(&sbi->s_lock); | 1251 | spin_unlock(&sbi->s_lock); |
1252 | |||
1253 | err = vfs_dq_off(sb, 1); | ||
1254 | if (err < 0 && err != -ENOSYS) { | ||
1255 | err = -EBUSY; | ||
1256 | spin_lock(&sbi->s_lock); | ||
1257 | goto restore_opts; | ||
1258 | } | ||
1259 | |||
1251 | ext2_sync_super(sb, es, 1); | 1260 | ext2_sync_super(sb, es, 1); |
1252 | } else { | 1261 | } else { |
1253 | __le32 ret = EXT2_HAS_RO_COMPAT_FEATURE(sb, | 1262 | __le32 ret = EXT2_HAS_RO_COMPAT_FEATURE(sb, |
@@ -1269,8 +1278,12 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data) | |||
1269 | if (!ext2_setup_super (sb, es, 0)) | 1278 | if (!ext2_setup_super (sb, es, 0)) |
1270 | sb->s_flags &= ~MS_RDONLY; | 1279 | sb->s_flags &= ~MS_RDONLY; |
1271 | spin_unlock(&sbi->s_lock); | 1280 | spin_unlock(&sbi->s_lock); |
1281 | |||
1272 | ext2_write_super(sb); | 1282 | ext2_write_super(sb); |
1283 | |||
1284 | vfs_dq_quota_on_remount(sb); | ||
1273 | } | 1285 | } |
1286 | |||
1274 | return 0; | 1287 | return 0; |
1275 | restore_opts: | 1288 | restore_opts: |
1276 | sbi->s_mount_opt = old_opts.s_mount_opt; | 1289 | sbi->s_mount_opt = old_opts.s_mount_opt; |