diff options
Diffstat (limited to 'fs/quota.c')
-rw-r--r-- | fs/quota.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/quota.c b/fs/quota.c index 612e04db4b93..d14d872646d4 100644 --- a/fs/quota.c +++ b/fs/quota.c | |||
@@ -168,7 +168,7 @@ static void quota_sync_sb(struct super_block *sb, int type) | |||
168 | sync_blockdev(sb->s_bdev); | 168 | sync_blockdev(sb->s_bdev); |
169 | 169 | ||
170 | /* Now when everything is written we can discard the pagecache so | 170 | /* Now when everything is written we can discard the pagecache so |
171 | * that userspace sees the changes. We need i_sem and so we could | 171 | * that userspace sees the changes. We need i_mutex and so we could |
172 | * not do it inside dqonoff_sem. Moreover we need to be carefull | 172 | * not do it inside dqonoff_sem. Moreover we need to be carefull |
173 | * about races with quotaoff() (that is the reason why we have own | 173 | * about races with quotaoff() (that is the reason why we have own |
174 | * reference to inode). */ | 174 | * reference to inode). */ |
@@ -184,9 +184,9 @@ static void quota_sync_sb(struct super_block *sb, int type) | |||
184 | up(&sb_dqopt(sb)->dqonoff_sem); | 184 | up(&sb_dqopt(sb)->dqonoff_sem); |
185 | for (cnt = 0; cnt < MAXQUOTAS; cnt++) { | 185 | for (cnt = 0; cnt < MAXQUOTAS; cnt++) { |
186 | if (discard[cnt]) { | 186 | if (discard[cnt]) { |
187 | down(&discard[cnt]->i_sem); | 187 | mutex_lock(&discard[cnt]->i_mutex); |
188 | truncate_inode_pages(&discard[cnt]->i_data, 0); | 188 | truncate_inode_pages(&discard[cnt]->i_data, 0); |
189 | up(&discard[cnt]->i_sem); | 189 | mutex_unlock(&discard[cnt]->i_mutex); |
190 | iput(discard[cnt]); | 190 | iput(discard[cnt]); |
191 | } | 191 | } |
192 | } | 192 | } |