diff options
author | Jes Sorensen <jes@sgi.com> | 2006-01-09 15:59:24 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@hera.kernel.org> | 2006-01-09 15:59:24 -0800 |
commit | 1b1dcc1b57a49136f118a0f16367256ff9994a69 (patch) | |
tree | b0b36d4f41d28c9d6514fb309d33c1a084d6309b /fs/ocfs2/journal.c | |
parent | 794ee1baee1c26be40410233e6c20bceb2b03c08 (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.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 04428042e5e..303c8d96457 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, atomic_inc(&inode->i_count); /* we're obviously changing it... */ - down(&inode->i_sem); + mutex_lock(&inode->i_mutex); /* sanity check */ BUG_ON(OCFS2_I(inode)->ip_handle); @@ -241,7 +241,7 @@ static void ocfs2_handle_unlock_inodes(struct ocfs2_journal_handle *handle) OCFS2_I(inode)->ip_handle = NULL; list_del_init(&OCFS2_I(inode)->ip_handle_list); - up(&inode->i_sem); + mutex_unlock(&inode->i_mutex); iput(inode); } } @@ -1433,10 +1433,10 @@ static int ocfs2_recover_orphans(struct ocfs2_super *osb, goto out; } - down(&orphan_dir_inode->i_sem); + mutex_lock(&orphan_dir_inode->i_mutex); status = ocfs2_meta_lock(orphan_dir_inode, NULL, NULL, 0); if (status < 0) { - up(&orphan_dir_inode->i_sem); + mutex_unlock(&orphan_dir_inode->i_mutex); mlog_errno(status); goto out; } @@ -1451,7 +1451,7 @@ static int ocfs2_recover_orphans(struct ocfs2_super *osb, if (!bh) status = -EINVAL; if (status < 0) { - up(&orphan_dir_inode->i_sem); + mutex_unlock(&orphan_dir_inode->i_mutex); if (bh) brelse(bh); mlog_errno(status); @@ -1465,7 +1465,7 @@ static int ocfs2_recover_orphans(struct ocfs2_super *osb, if (!ocfs2_check_dir_entry(orphan_dir_inode, de, bh, local)) { - up(&orphan_dir_inode->i_sem); + mutex_unlock(&orphan_dir_inode->i_mutex); status = -EINVAL; mlog_errno(status); brelse(bh); @@ -1509,7 +1509,7 @@ static int ocfs2_recover_orphans(struct ocfs2_super *osb, } brelse(bh); } - up(&orphan_dir_inode->i_sem); + mutex_unlock(&orphan_dir_inode->i_mutex); ocfs2_meta_unlock(orphan_dir_inode, 0); have_disk_lock = 0; |