aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/mem.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 /drivers/char/mem.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 'drivers/char/mem.c')
-rw-r--r--drivers/char/mem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 5b2d18035073..704c3c07f0ab 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -741,7 +741,7 @@ static loff_t memory_lseek(struct file * file, loff_t offset, int orig)
741{ 741{
742 loff_t ret; 742 loff_t ret;
743 743
744 down(&file->f_dentry->d_inode->i_sem); 744 mutex_lock(&file->f_dentry->d_inode->i_mutex);
745 switch (orig) { 745 switch (orig) {
746 case 0: 746 case 0:
747 file->f_pos = offset; 747 file->f_pos = offset;
@@ -756,7 +756,7 @@ static loff_t memory_lseek(struct file * file, loff_t offset, int orig)
756 default: 756 default:
757 ret = -EINVAL; 757 ret = -EINVAL;
758 } 758 }
759 up(&file->f_dentry->d_inode->i_sem); 759 mutex_unlock(&file->f_dentry->d_inode->i_mutex);
760 return ret; 760 return ret;
761} 761}
762 762