X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=blobdiff_plain;f=fs%2Fquota%2Fdquot.c;h=e1a155e8db155fdd221029933daf0cac4a6bbe75;hp=5e77c4da69a63f40063ce4545e5b1216b06ef4a9;hb=15512377bd971ecc86f2eab40b841b265b5043de;hpb=f98bbe37ae96873ce93f36f4cdc7b47d85cc4455 diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 5e77c4da69a6..e1a155e8db15 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -389,7 +389,9 @@ static inline int clear_dquot_dirty(struct dquot *dquot) void mark_info_dirty(struct super_block *sb, int type) { - set_bit(DQF_INFO_DIRTY_B, &sb_dqopt(sb)->info[type].dqi_flags); + spin_lock(&dq_data_lock); + sb_dqopt(sb)->info[type].dqi_flags |= DQF_INFO_DIRTY; + spin_unlock(&dq_data_lock); } EXPORT_SYMBOL(mark_info_dirty); @@ -2316,8 +2318,11 @@ static int vfs_load_quota_inode(struct inode *inode, int type, int format_id, error = dqopt->ops[type]->read_file_info(sb, type); if (error < 0) goto out_file_init; - if (dqopt->flags & DQUOT_QUOTA_SYS_FILE) + if (dqopt->flags & DQUOT_QUOTA_SYS_FILE) { + spin_lock(&dq_data_lock); dqopt->info[type].dqi_flags |= DQF_SYS_FILE; + spin_unlock(&dq_data_lock); + } spin_lock(&dq_state_lock); dqopt->flags |= dquot_state_flag(flags, type); spin_unlock(&dq_state_lock);