summaryrefslogtreecommitdiffstats
path: root/fs/quota
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2014-11-19 09:03:28 +0100
committerJan Kara <jack@suse.cz>2015-01-21 19:21:07 +0100
commitc119c5b9749e4df5e6344b5d2ccd959dd403c959 (patch)
treefd4da9b57f5bb735a35f5fa4e8056234e0e2f1da /fs/quota
parentc38fda3fe8163898f538a45d3c1419e6870625ed (diff)
downloadlinux-stable-c119c5b9749e4df5e6344b5d2ccd959dd403c959.tar.gz
linux-stable-c119c5b9749e4df5e6344b5d2ccd959dd403c959.tar.bz2
linux-stable-c119c5b9749e4df5e6344b5d2ccd959dd403c959.zip
quota: Don't store flags for v2 quota format
Currently, v2 quota format blindly stored flags from in-memory dqinfo on disk, although there are no flags supported. Since it is stupid to store flags which have no effect, just store 0 unconditionally and don't bother loading it from disk. Note that userspace could have stored some flags there via Q_SETINFO quotactl and then later read them (although flags have no effect) but I'm pretty sure noone does that (most definitely quota-tools don't and quota interface doesn't have too much other users). Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/quota')
-rw-r--r--fs/quota/quota_v2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/quota/quota_v2.c b/fs/quota/quota_v2.c
index 02751ec695c5..54cac436ac72 100644
--- a/fs/quota/quota_v2.c
+++ b/fs/quota/quota_v2.c
@@ -126,7 +126,8 @@ static int v2_read_file_info(struct super_block *sb, int type)
}
info->dqi_bgrace = le32_to_cpu(dinfo.dqi_bgrace);
info->dqi_igrace = le32_to_cpu(dinfo.dqi_igrace);
- info->dqi_flags = le32_to_cpu(dinfo.dqi_flags);
+ /* No flags currently supported */
+ info->dqi_flags = 0;
qinfo->dqi_sb = sb;
qinfo->dqi_type = type;
qinfo->dqi_blocks = le32_to_cpu(dinfo.dqi_blocks);
@@ -157,7 +158,8 @@ static int v2_write_file_info(struct super_block *sb, int type)
info->dqi_flags &= ~DQF_INFO_DIRTY;
dinfo.dqi_bgrace = cpu_to_le32(info->dqi_bgrace);
dinfo.dqi_igrace = cpu_to_le32(info->dqi_igrace);
- dinfo.dqi_flags = cpu_to_le32(info->dqi_flags & DQF_MASK);
+ /* No flags currently supported */
+ dinfo.dqi_flags = cpu_to_le32(0);
spin_unlock(&dq_data_lock);
dinfo.dqi_blocks = cpu_to_le32(qinfo->dqi_blocks);
dinfo.dqi_free_blk = cpu_to_le32(qinfo->dqi_free_blk);