From a4374a31432ec040e28d8d341403b387c61343a0 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Mon, 28 Apr 2008 02:14:34 -0700 Subject: [PATCH] --- yaml --- r: 94117 b: refs/heads/master c: 2fd83a4f3cd5a725168e3a269746dfce2adfa56a h: refs/heads/master i: 94115: 38ba5720c23931ad9157e7015813526d02fa57ed v: v3 --- [refs] | 2 +- trunk/fs/ext3/super.c | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index bff7f38f2ef8..e2824e6ea10e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0ff5af8340aa6be44220d7237ef4a654314cf795 +refs/heads/master: 2fd83a4f3cd5a725168e3a269746dfce2adfa56a diff --git a/trunk/fs/ext3/super.c b/trunk/fs/ext3/super.c index ad5360664082..883ff965d984 100644 --- a/trunk/fs/ext3/super.c +++ b/trunk/fs/ext3/super.c @@ -685,7 +685,8 @@ static int ext3_acquire_dquot(struct dquot *dquot); static int ext3_release_dquot(struct dquot *dquot); static int ext3_mark_dquot_dirty(struct dquot *dquot); static int ext3_write_info(struct super_block *sb, int type); -static int ext3_quota_on(struct super_block *sb, int type, int format_id, char *path); +static int ext3_quota_on(struct super_block *sb, int type, int format_id, + char *path, int remount); static int ext3_quota_on_mount(struct super_block *sb, int type); static ssize_t ext3_quota_read(struct super_block *sb, int type, char *data, size_t len, loff_t off); @@ -1415,7 +1416,7 @@ static void ext3_orphan_cleanup (struct super_block * sb, /* Turn quotas off */ for (i = 0; i < MAXQUOTAS; i++) { if (sb_dqopt(sb)->files[i]) - vfs_quota_off(sb, i); + vfs_quota_off(sb, i, 0); } #endif sb->s_flags = s_flags; /* Restore MS_RDONLY status */ @@ -2743,17 +2744,17 @@ static int ext3_quota_on_mount(struct super_block *sb, int type) * Standard function to be called on quota_on */ static int ext3_quota_on(struct super_block *sb, int type, int format_id, - char *path) + char *path, int remount) { int err; struct nameidata nd; if (!test_opt(sb, QUOTA)) return -EINVAL; - /* Not journalling quota? */ - if (!EXT3_SB(sb)->s_qf_names[USRQUOTA] && - !EXT3_SB(sb)->s_qf_names[GRPQUOTA]) - return vfs_quota_on(sb, type, format_id, path); + /* Not journalling quota or remount? */ + if ((!EXT3_SB(sb)->s_qf_names[USRQUOTA] && + !EXT3_SB(sb)->s_qf_names[GRPQUOTA]) || remount) + return vfs_quota_on(sb, type, format_id, path, remount); err = path_lookup(path, LOOKUP_FOLLOW, &nd); if (err) return err; @@ -2762,13 +2763,13 @@ static int ext3_quota_on(struct super_block *sb, int type, int format_id, path_put(&nd.path); return -EXDEV; } - /* Quotafile not of fs root? */ + /* Quotafile not in fs root? */ if (nd.path.dentry->d_parent->d_inode != sb->s_root->d_inode) printk(KERN_WARNING "EXT3-fs: Quota file not on filesystem root. " "Journalled quota will not work.\n"); path_put(&nd.path); - return vfs_quota_on(sb, type, format_id, path); + return vfs_quota_on(sb, type, format_id, path, remount); } /* Read data from quotafile - avoid pagecache and such because we cannot afford