aboutsummaryrefslogtreecommitdiffstats
path: root/fs/quota.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/quota.c')
-rw-r--r--fs/quota.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/quota.c b/fs/quota.c
index ba9e0bf32f67..d6a2be826e29 100644
--- a/fs/quota.c
+++ b/fs/quota.c
@@ -170,10 +170,10 @@ static void quota_sync_sb(struct super_block *sb, int type)
170 170
171 /* Now when everything is written we can discard the pagecache so 171 /* Now when everything is written we can discard the pagecache so
172 * that userspace sees the changes. We need i_mutex and so we could 172 * that userspace sees the changes. We need i_mutex and so we could
173 * not do it inside dqonoff_sem. Moreover we need to be carefull 173 * not do it inside dqonoff_mutex. Moreover we need to be carefull
174 * about races with quotaoff() (that is the reason why we have own 174 * about races with quotaoff() (that is the reason why we have own
175 * reference to inode). */ 175 * reference to inode). */
176 down(&sb_dqopt(sb)->dqonoff_sem); 176 mutex_lock(&sb_dqopt(sb)->dqonoff_mutex);
177 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { 177 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
178 discard[cnt] = NULL; 178 discard[cnt] = NULL;
179 if (type != -1 && cnt != type) 179 if (type != -1 && cnt != type)
@@ -182,7 +182,7 @@ static void quota_sync_sb(struct super_block *sb, int type)
182 continue; 182 continue;
183 discard[cnt] = igrab(sb_dqopt(sb)->files[cnt]); 183 discard[cnt] = igrab(sb_dqopt(sb)->files[cnt]);
184 } 184 }
185 up(&sb_dqopt(sb)->dqonoff_sem); 185 mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex);
186 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { 186 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
187 if (discard[cnt]) { 187 if (discard[cnt]) {
188 mutex_lock(&discard[cnt]->i_mutex); 188 mutex_lock(&discard[cnt]->i_mutex);