diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-03-23 06:00:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 10:38:11 -0500 |
commit | d3be915fc5e7d19a2283ad9b0fe0782a74675d0a (patch) | |
tree | e03647affdee4e72dbff4a5da55bcf32bfa65901 /fs/quota.c | |
parent | c039e3134ae62863bbc8e8429b29e3c43cf21b2a (diff) |
[PATCH] sem2mutex: quota
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Jan Kara <jack@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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 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); |