diff options
author | Jes Sorensen <jes@sgi.com> | 2006-01-09 18:59:24 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@hera.kernel.org> | 2006-01-09 18:59:24 -0500 |
commit | 1b1dcc1b57a49136f118a0f16367256ff9994a69 (patch) | |
tree | b0b36d4f41d28c9d6514fb309d33c1a084d6309b /fs/hfs | |
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/hfs')
-rw-r--r-- | fs/hfs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index d499393a8ae7..050a49276499 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c | |||
@@ -547,13 +547,13 @@ static int hfs_file_release(struct inode *inode, struct file *file) | |||
547 | if (atomic_read(&file->f_count) != 0) | 547 | if (atomic_read(&file->f_count) != 0) |
548 | return 0; | 548 | return 0; |
549 | if (atomic_dec_and_test(&HFS_I(inode)->opencnt)) { | 549 | if (atomic_dec_and_test(&HFS_I(inode)->opencnt)) { |
550 | down(&inode->i_sem); | 550 | mutex_lock(&inode->i_mutex); |
551 | hfs_file_truncate(inode); | 551 | hfs_file_truncate(inode); |
552 | //if (inode->i_flags & S_DEAD) { | 552 | //if (inode->i_flags & S_DEAD) { |
553 | // hfs_delete_cat(inode->i_ino, HFSPLUS_SB(sb).hidden_dir, NULL); | 553 | // hfs_delete_cat(inode->i_ino, HFSPLUS_SB(sb).hidden_dir, NULL); |
554 | // hfs_delete_inode(inode); | 554 | // hfs_delete_inode(inode); |
555 | //} | 555 | //} |
556 | up(&inode->i_sem); | 556 | mutex_unlock(&inode->i_mutex); |
557 | } | 557 | } |
558 | return 0; | 558 | return 0; |
559 | } | 559 | } |