diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-05-19 07:16:40 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2010-05-24 08:06:39 -0400 |
commit | c79d967de3741ceb60c5bbbf1b6f97eab9a89838 (patch) | |
tree | 5494e7b504cffb0ddc6942d1542c2b4a472207ed /fs/reiserfs/super.c | |
parent | eea7feb072f5914ecafa95b3d83be0c229244d90 (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.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 59125fb36d42..49a8ba02bc17 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) | |||
1242 | if (s->s_flags & MS_RDONLY) | 1242 | if (s->s_flags & MS_RDONLY) |
1243 | /* it is read-only already */ | 1243 | /* it is read-only already */ |
1244 | goto out_ok; | 1244 | goto out_ok; |
1245 | |||
1246 | err = vfs_dq_off(s, 1); | ||
1247 | if (err < 0 && err != -ENOSYS) { | ||
1248 | err = -EBUSY; | ||
1249 | goto out_err; | ||
1250 | } | ||
1251 | |||
1245 | /* try to remount file system with read-only permissions */ | 1252 | /* try to remount file system with read-only permissions */ |
1246 | if (sb_umount_state(rs) == REISERFS_VALID_FS | 1253 | if (sb_umount_state(rs) == REISERFS_VALID_FS |
1247 | || REISERFS_SB(s)->s_mount_state != REISERFS_VALID_FS) { | 1254 | || 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) | |||
1295 | s->s_dirt = 0; | 1302 | s->s_dirt = 0; |
1296 | 1303 | ||
1297 | if (!(*mount_flags & MS_RDONLY)) { | 1304 | if (!(*mount_flags & MS_RDONLY)) { |
1305 | vfs_dq_quota_on_remount(s); | ||
1298 | finish_unfinished(s); | 1306 | finish_unfinished(s); |
1299 | reiserfs_xattr_init(s, *mount_flags); | 1307 | reiserfs_xattr_init(s, *mount_flags); |
1300 | } | 1308 | } |