aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/journal.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/ocfs2/journal.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/ocfs2/journal.c')
-rw-r--r--fs/ocfs2/journal.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index 04428042e5e5..303c8d96457f 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -216,7 +216,7 @@ void ocfs2_handle_add_inode(struct ocfs2_journal_handle *handle,
216 atomic_inc(&inode->i_count); 216 atomic_inc(&inode->i_count);
217 217
218 /* we're obviously changing it... */ 218 /* we're obviously changing it... */
219 down(&inode->i_sem); 219 mutex_lock(&inode->i_mutex);
220 220
221 /* sanity check */ 221 /* sanity check */
222 BUG_ON(OCFS2_I(inode)->ip_handle); 222 BUG_ON(OCFS2_I(inode)->ip_handle);
@@ -241,7 +241,7 @@ static void ocfs2_handle_unlock_inodes(struct ocfs2_journal_handle *handle)
241 OCFS2_I(inode)->ip_handle = NULL; 241 OCFS2_I(inode)->ip_handle = NULL;
242 list_del_init(&OCFS2_I(inode)->ip_handle_list); 242 list_del_init(&OCFS2_I(inode)->ip_handle_list);
243 243
244 up(&inode->i_sem); 244 mutex_unlock(&inode->i_mutex);
245 iput(inode); 245 iput(inode);
246 } 246 }
247} 247}
@@ -1433,10 +1433,10 @@ static int ocfs2_recover_orphans(struct ocfs2_super *osb,
1433 goto out; 1433 goto out;
1434 } 1434 }
1435 1435
1436 down(&orphan_dir_inode->i_sem); 1436 mutex_lock(&orphan_dir_inode->i_mutex);
1437 status = ocfs2_meta_lock(orphan_dir_inode, NULL, NULL, 0); 1437 status = ocfs2_meta_lock(orphan_dir_inode, NULL, NULL, 0);
1438 if (status < 0) { 1438 if (status < 0) {
1439 up(&orphan_dir_inode->i_sem); 1439 mutex_unlock(&orphan_dir_inode->i_mutex);
1440 mlog_errno(status); 1440 mlog_errno(status);
1441 goto out; 1441 goto out;
1442 } 1442 }
@@ -1451,7 +1451,7 @@ static int ocfs2_recover_orphans(struct ocfs2_super *osb,
1451 if (!bh) 1451 if (!bh)
1452 status = -EINVAL; 1452 status = -EINVAL;
1453 if (status < 0) { 1453 if (status < 0) {
1454 up(&orphan_dir_inode->i_sem); 1454 mutex_unlock(&orphan_dir_inode->i_mutex);
1455 if (bh) 1455 if (bh)
1456 brelse(bh); 1456 brelse(bh);
1457 mlog_errno(status); 1457 mlog_errno(status);
@@ -1465,7 +1465,7 @@ static int ocfs2_recover_orphans(struct ocfs2_super *osb,
1465 1465
1466 if (!ocfs2_check_dir_entry(orphan_dir_inode, 1466 if (!ocfs2_check_dir_entry(orphan_dir_inode,
1467 de, bh, local)) { 1467 de, bh, local)) {
1468 up(&orphan_dir_inode->i_sem); 1468 mutex_unlock(&orphan_dir_inode->i_mutex);
1469 status = -EINVAL; 1469 status = -EINVAL;
1470 mlog_errno(status); 1470 mlog_errno(status);
1471 brelse(bh); 1471 brelse(bh);
@@ -1509,7 +1509,7 @@ static int ocfs2_recover_orphans(struct ocfs2_super *osb,
1509 } 1509 }
1510 brelse(bh); 1510 brelse(bh);
1511 } 1511 }
1512 up(&orphan_dir_inode->i_sem); 1512 mutex_unlock(&orphan_dir_inode->i_mutex);
1513 1513
1514 ocfs2_meta_unlock(orphan_dir_inode, 0); 1514 ocfs2_meta_unlock(orphan_dir_inode, 0);
1515 have_disk_lock = 0; 1515 have_disk_lock = 0;