aboutsummaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/super.c b/fs/super.c
index 69688b15f1fa..a38e6e9b6f69 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -524,7 +524,7 @@ rescan:
524int do_remount_sb(struct super_block *sb, int flags, void *data, int force) 524int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
525{ 525{
526 int retval; 526 int retval;
527 int remount_rw, remount_ro; 527 int remount_ro;
528 528
529 if (sb->s_frozen != SB_UNFROZEN) 529 if (sb->s_frozen != SB_UNFROZEN)
530 return -EBUSY; 530 return -EBUSY;
@@ -540,7 +540,6 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
540 sync_filesystem(sb); 540 sync_filesystem(sb);
541 541
542 remount_ro = (flags & MS_RDONLY) && !(sb->s_flags & MS_RDONLY); 542 remount_ro = (flags & MS_RDONLY) && !(sb->s_flags & MS_RDONLY);
543 remount_rw = !(flags & MS_RDONLY) && (sb->s_flags & MS_RDONLY);
544 543
545 /* If we are remounting RDONLY and current sb is read/write, 544 /* If we are remounting RDONLY and current sb is read/write,
546 make sure there are no rw files opened */ 545 make sure there are no rw files opened */
@@ -549,9 +548,6 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
549 mark_files_ro(sb); 548 mark_files_ro(sb);
550 else if (!fs_may_remount_ro(sb)) 549 else if (!fs_may_remount_ro(sb))
551 return -EBUSY; 550 return -EBUSY;
552 retval = vfs_dq_off(sb, 1);
553 if (retval < 0 && retval != -ENOSYS)
554 return -EBUSY;
555 } 551 }
556 552
557 if (sb->s_op->remount_fs) { 553 if (sb->s_op->remount_fs) {
@@ -560,8 +556,7 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
560 return retval; 556 return retval;
561 } 557 }
562 sb->s_flags = (sb->s_flags & ~MS_RMT_MASK) | (flags & MS_RMT_MASK); 558 sb->s_flags = (sb->s_flags & ~MS_RMT_MASK) | (flags & MS_RMT_MASK);
563 if (remount_rw) 559
564 vfs_dq_quota_on_remount(sb);
565 /* 560 /*
566 * Some filesystems modify their metadata via some other path than the 561 * Some filesystems modify their metadata via some other path than the
567 * bdev buffer cache (eg. use a private mapping, or directories in 562 * bdev buffer cache (eg. use a private mapping, or directories in