summaryrefslogtreecommitdiffstats
path: root/fs/quota/quota_v1.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/quota/quota_v1.c')
-rw-r--r--fs/quota/quota_v1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/quota/quota_v1.c b/fs/quota/quota_v1.c
index b2d8e04e567a..7ac5298aba70 100644
--- a/fs/quota/quota_v1.c
+++ b/fs/quota/quota_v1.c
@@ -189,7 +189,6 @@ static int v1_write_file_info(struct super_block *sb, int type)
int ret;
down_write(&dqopt->dqio_sem);
- dqopt->info[type].dqi_flags &= ~DQF_INFO_DIRTY;
ret = sb->s_op->quota_read(sb, type, (char *)&dqblk,
sizeof(struct v1_disk_dqblk), v1_dqoff(0));
if (ret != sizeof(struct v1_disk_dqblk)) {
@@ -197,8 +196,11 @@ static int v1_write_file_info(struct super_block *sb, int type)
ret = -EIO;
goto out;
}
+ spin_lock(&dq_data_lock);
+ dqopt->info[type].dqi_flags &= ~DQF_INFO_DIRTY;
dqblk.dqb_itime = dqopt->info[type].dqi_igrace;
dqblk.dqb_btime = dqopt->info[type].dqi_bgrace;
+ spin_unlock(&dq_data_lock);
ret = sb->s_op->quota_write(sb, type, (char *)&dqblk,
sizeof(struct v1_disk_dqblk), v1_dqoff(0));
if (ret == sizeof(struct v1_disk_dqblk))