aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/super.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2010-05-19 07:16:40 -0400
committerJan Kara <jack@suse.cz>2010-05-24 08:06:39 -0400
commitc79d967de3741ceb60c5bbbf1b6f97eab9a89838 (patch)
tree5494e7b504cffb0ddc6942d1542c2b4a472207ed /fs/udf/super.c
parenteea7feb072f5914ecafa95b3d83be0c229244d90 (diff)
quota: move remount handling into the filesystem
Currently do_remount_sb calls into the dquot code to tell it about going from rw to ro and ro to rw. Move this code into the filesystem to not depend on the dquot code in the VFS - note ocfs2 already ignores these calls and handles remount by itself. This gets rid of overloading the quotactl calls and allows to unify the VFS and XFS codepaths in that area later. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
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) */