From 0ff5af8340aa6be44220d7237ef4a654314cf795 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Mon, 28 Apr 2008 02:14:33 -0700 Subject: quota: quota core changes for quotaon on remount Currently, we just turn quotas off on remount of filesystem to read-only state. The patch below adds necessary framework so that we can turn quotas off on remount RO but we are able to automatically reenable them again when filesystem is remounted to RW state. All we need to do is to keep references to inodes of quota files when remounting RO and using these references to reenable quotas when remounting RW. Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/quota.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'fs/quota.c') diff --git a/fs/quota.c b/fs/quota.c index 84f28dd7211..db1cc9f3c7a 100644 --- a/fs/quota.c +++ b/fs/quota.c @@ -69,7 +69,6 @@ static int generic_quotactl_valid(struct super_block *sb, int type, int cmd, qid switch (cmd) { case Q_GETFMT: case Q_GETINFO: - case Q_QUOTAOFF: case Q_SETINFO: case Q_SETQUOTA: case Q_GETQUOTA: @@ -229,12 +228,12 @@ static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id, void if (IS_ERR(pathname = getname(addr))) return PTR_ERR(pathname); - ret = sb->s_qcop->quota_on(sb, type, id, pathname); + ret = sb->s_qcop->quota_on(sb, type, id, pathname, 0); putname(pathname); return ret; } case Q_QUOTAOFF: - return sb->s_qcop->quota_off(sb, type); + return sb->s_qcop->quota_off(sb, type, 0); case Q_GETFMT: { __u32 fmt; -- cgit v1.2.3