diff options
author | Jan Kara <jack@suse.cz> | 2008-04-28 05:14:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:33 -0400 |
commit | 0ff5af8340aa6be44220d7237ef4a654314cf795 (patch) | |
tree | a9536ea573725931cd4eb3139f4885887e3f8bf8 /fs/quota.c | |
parent | 03f6e92bdd467aed9d7571a571868563ae6ad288 (diff) |
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 <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/quota.c')
-rw-r--r-- | fs/quota.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/quota.c b/fs/quota.c index 84f28dd72116..db1cc9f3c7aa 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 | |||
69 | switch (cmd) { | 69 | switch (cmd) { |
70 | case Q_GETFMT: | 70 | case Q_GETFMT: |
71 | case Q_GETINFO: | 71 | case Q_GETINFO: |
72 | case Q_QUOTAOFF: | ||
73 | case Q_SETINFO: | 72 | case Q_SETINFO: |
74 | case Q_SETQUOTA: | 73 | case Q_SETQUOTA: |
75 | case Q_GETQUOTA: | 74 | case Q_GETQUOTA: |
@@ -229,12 +228,12 @@ static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id, void | |||
229 | 228 | ||
230 | if (IS_ERR(pathname = getname(addr))) | 229 | if (IS_ERR(pathname = getname(addr))) |
231 | return PTR_ERR(pathname); | 230 | return PTR_ERR(pathname); |
232 | ret = sb->s_qcop->quota_on(sb, type, id, pathname); | 231 | ret = sb->s_qcop->quota_on(sb, type, id, pathname, 0); |
233 | putname(pathname); | 232 | putname(pathname); |
234 | return ret; | 233 | return ret; |
235 | } | 234 | } |
236 | case Q_QUOTAOFF: | 235 | case Q_QUOTAOFF: |
237 | return sb->s_qcop->quota_off(sb, type); | 236 | return sb->s_qcop->quota_off(sb, type, 0); |
238 | 237 | ||
239 | case Q_GETFMT: { | 238 | case Q_GETFMT: { |
240 | __u32 fmt; | 239 | __u32 fmt; |