aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/super.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 13383ba18f1d..c81a8e759bad 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -813,7 +813,8 @@ static int ext4_acquire_dquot(struct dquot *dquot);
813static int ext4_release_dquot(struct dquot *dquot); 813static int ext4_release_dquot(struct dquot *dquot);
814static int ext4_mark_dquot_dirty(struct dquot *dquot); 814static int ext4_mark_dquot_dirty(struct dquot *dquot);
815static int ext4_write_info(struct super_block *sb, int type); 815static int ext4_write_info(struct super_block *sb, int type);
816static int ext4_quota_on(struct super_block *sb, int type, int format_id, char *path); 816static int ext4_quota_on(struct super_block *sb, int type, int format_id,
817 char *path, int remount);
817static int ext4_quota_on_mount(struct super_block *sb, int type); 818static int ext4_quota_on_mount(struct super_block *sb, int type);
818static ssize_t ext4_quota_read(struct super_block *sb, int type, char *data, 819static ssize_t ext4_quota_read(struct super_block *sb, int type, char *data,
819 size_t len, loff_t off); 820 size_t len, loff_t off);
@@ -1632,7 +1633,7 @@ static void ext4_orphan_cleanup (struct super_block * sb,
1632 /* Turn quotas off */ 1633 /* Turn quotas off */
1633 for (i = 0; i < MAXQUOTAS; i++) { 1634 for (i = 0; i < MAXQUOTAS; i++) {
1634 if (sb_dqopt(sb)->files[i]) 1635 if (sb_dqopt(sb)->files[i])
1635 vfs_quota_off(sb, i); 1636 vfs_quota_off(sb, i, 0);
1636 } 1637 }
1637#endif 1638#endif
1638 sb->s_flags = s_flags; /* Restore MS_RDONLY status */ 1639 sb->s_flags = s_flags; /* Restore MS_RDONLY status */
@@ -3143,7 +3144,7 @@ static int ext4_quota_on_mount(struct super_block *sb, int type)
3143 * Standard function to be called on quota_on 3144 * Standard function to be called on quota_on
3144 */ 3145 */
3145static int ext4_quota_on(struct super_block *sb, int type, int format_id, 3146static int ext4_quota_on(struct super_block *sb, int type, int format_id,
3146 char *path) 3147 char *path, int remount)
3147{ 3148{
3148 int err; 3149 int err;
3149 struct nameidata nd; 3150 struct nameidata nd;
@@ -3151,9 +3152,9 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id,
3151 if (!test_opt(sb, QUOTA)) 3152 if (!test_opt(sb, QUOTA))
3152 return -EINVAL; 3153 return -EINVAL;
3153 /* Not journalling quota? */ 3154 /* Not journalling quota? */
3154 if (!EXT4_SB(sb)->s_qf_names[USRQUOTA] && 3155 if ((!EXT4_SB(sb)->s_qf_names[USRQUOTA] &&
3155 !EXT4_SB(sb)->s_qf_names[GRPQUOTA]) 3156 !EXT4_SB(sb)->s_qf_names[GRPQUOTA]) || remount)
3156 return vfs_quota_on(sb, type, format_id, path); 3157 return vfs_quota_on(sb, type, format_id, path, remount);
3157 err = path_lookup(path, LOOKUP_FOLLOW, &nd); 3158 err = path_lookup(path, LOOKUP_FOLLOW, &nd);
3158 if (err) 3159 if (err)
3159 return err; 3160 return err;
@@ -3168,7 +3169,7 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id,
3168 "EXT4-fs: Quota file not on filesystem root. " 3169 "EXT4-fs: Quota file not on filesystem root. "
3169 "Journalled quota will not work.\n"); 3170 "Journalled quota will not work.\n");
3170 path_put(&nd.path); 3171 path_put(&nd.path);
3171 return vfs_quota_on(sb, type, format_id, path); 3172 return vfs_quota_on(sb, type, format_id, path, remount);
3172} 3173}
3173 3174
3174/* Read data from quotafile - avoid pagecache and such because we cannot afford 3175/* Read data from quotafile - avoid pagecache and such because we cannot afford