summaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/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 14:06:39 +0200
commitc79d967de3741ceb60c5bbbf1b6f97eab9a89838 (patch)
tree5494e7b504cffb0ddc6942d1542c2b4a472207ed /fs/reiserfs/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/reiserfs/super.c')
-rw-r--r--fs/reiserfs/super.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 59125fb36d4..49a8ba02bc1 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -1242,6 +1242,13 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg)
if (s->s_flags & MS_RDONLY)
/* it is read-only already */
goto out_ok;
+
+ err = vfs_dq_off(s, 1);
+ if (err < 0 && err != -ENOSYS) {
+ err = -EBUSY;
+ goto out_err;
+ }
+
/* try to remount file system with read-only permissions */
if (sb_umount_state(rs) == REISERFS_VALID_FS
|| REISERFS_SB(s)->s_mount_state != REISERFS_VALID_FS) {
@@ -1295,6 +1302,7 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg)
s->s_dirt = 0;
if (!(*mount_flags & MS_RDONLY)) {
+ vfs_dq_quota_on_remount(s);
finish_unfinished(s);
reiserfs_xattr_init(s, *mount_flags);
}