aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/udf/super.c')
-rw-r--r--fs/udf/super.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 1e4543cbcd27..9ab4e259404b 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -54,6 +54,7 @@
54#include <linux/vmalloc.h> 54#include <linux/vmalloc.h>
55#include <linux/errno.h> 55#include <linux/errno.h>
56#include <linux/mount.h> 56#include <linux/mount.h>
57#include <linux/quotaops.h>
57#include <linux/seq_file.h> 58#include <linux/seq_file.h>
58#include <linux/bitmap.h> 59#include <linux/bitmap.h>
59#include <linux/crc-itu-t.h> 60#include <linux/crc-itu-t.h>
@@ -557,6 +558,7 @@ static int udf_remount_fs(struct super_block *sb, int *flags, char *options)
557{ 558{
558 struct udf_options uopt; 559 struct udf_options uopt;
559 struct udf_sb_info *sbi = UDF_SB(sb); 560 struct udf_sb_info *sbi = UDF_SB(sb);
561 int error = 0;
560 562
561 uopt.flags = sbi->s_flags; 563 uopt.flags = sbi->s_flags;
562 uopt.uid = sbi->s_uid; 564 uopt.uid = sbi->s_uid;
@@ -582,17 +584,26 @@ static int udf_remount_fs(struct super_block *sb, int *flags, char *options)
582 *flags |= MS_RDONLY; 584 *flags |= MS_RDONLY;
583 } 585 }
584 586
585 if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) { 587 if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
586 unlock_kernel(); 588 goto out_unlock;
587 return 0; 589
588 } 590 if (*flags & MS_RDONLY) {
589 if (*flags & MS_RDONLY)
590 udf_close_lvid(sb); 591 udf_close_lvid(sb);
591 else 592
593 error = vfs_dq_off(sb, 1);
594 if (error < 0 && error != -ENOSYS)
595 error = -EBUSY;
596 } else {
592 udf_open_lvid(sb); 597 udf_open_lvid(sb);
593 598
599 /* mark the fs r/w for quota activity */
600 sb->s_flags &= ~MS_RDONLY;
601 vfs_dq_quota_on_remount(sb);
602 }
603
604out_unlock:
594 unlock_kernel(); 605 unlock_kernel();
595 return 0; 606 return error;
596} 607}
597 608
598/* Check Volume Structure Descriptors (ECMA 167 2/9.1) */ 609/* Check Volume Structure Descriptors (ECMA 167 2/9.1) */