aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/super.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/super.c b/fs/super.c
index 83b47416d006..d40d53a22fb5 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -545,24 +545,18 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
545 if ((flags & MS_RDONLY) && !(sb->s_flags & MS_RDONLY)) { 545 if ((flags & MS_RDONLY) && !(sb->s_flags & MS_RDONLY)) {
546 if (force) 546 if (force)
547 mark_files_ro(sb); 547 mark_files_ro(sb);
548 else if (!fs_may_remount_ro(sb)) { 548 else if (!fs_may_remount_ro(sb))
549 unlock_kernel();
550 return -EBUSY; 549 return -EBUSY;
551 }
552 retval = vfs_dq_off(sb, 1); 550 retval = vfs_dq_off(sb, 1);
553 if (retval < 0 && retval != -ENOSYS) { 551 if (retval < 0 && retval != -ENOSYS)
554 unlock_kernel();
555 return -EBUSY; 552 return -EBUSY;
556 }
557 } 553 }
558 remount_rw = !(flags & MS_RDONLY) && (sb->s_flags & MS_RDONLY); 554 remount_rw = !(flags & MS_RDONLY) && (sb->s_flags & MS_RDONLY);
559 555
560 if (sb->s_op->remount_fs) { 556 if (sb->s_op->remount_fs) {
561 retval = sb->s_op->remount_fs(sb, &flags, data); 557 retval = sb->s_op->remount_fs(sb, &flags, data);
562 if (retval) { 558 if (retval)
563 unlock_kernel();
564 return retval; 559 return retval;
565 }
566 } 560 }
567 sb->s_flags = (sb->s_flags & ~MS_RMT_MASK) | (flags & MS_RMT_MASK); 561 sb->s_flags = (sb->s_flags & ~MS_RMT_MASK) | (flags & MS_RMT_MASK);
568 if (remount_rw) 562 if (remount_rw)