aboutsummaryrefslogtreecommitdiffstats
path: root/fs/quota.c
diff options
context:
space:
mode:
authorJes Sorensen <jes@sgi.com>2006-01-09 18:59:24 -0500
committerIngo Molnar <mingo@hera.kernel.org>2006-01-09 18:59:24 -0500
commit1b1dcc1b57a49136f118a0f16367256ff9994a69 (patch)
treeb0b36d4f41d28c9d6514fb309d33c1a084d6309b /fs/quota.c
parent794ee1baee1c26be40410233e6c20bceb2b03c08 (diff)
[PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
This patch converts the inode semaphore to a mutex. I have tested it on XFS and compiled as much as one can consider on an ia64. Anyway your luck with it might be different. Modified-by: Ingo Molnar <mingo@elte.hu> (finished the conversion) Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
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 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 }