aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/mqueue.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 /ipc/mqueue.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 'ipc/mqueue.c')
-rw-r--r--ipc/mqueue.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index c8943b53d8e6..a8aa6152eea6 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -660,7 +660,7 @@ asmlinkage long sys_mq_open(const char __user *u_name, int oflag, mode_t mode,
660 if (fd < 0) 660 if (fd < 0)
661 goto out_putname; 661 goto out_putname;
662 662
663 down(&mqueue_mnt->mnt_root->d_inode->i_sem); 663 mutex_lock(&mqueue_mnt->mnt_root->d_inode->i_mutex);
664 dentry = lookup_one_len(name, mqueue_mnt->mnt_root, strlen(name)); 664 dentry = lookup_one_len(name, mqueue_mnt->mnt_root, strlen(name));
665 if (IS_ERR(dentry)) { 665 if (IS_ERR(dentry)) {
666 error = PTR_ERR(dentry); 666 error = PTR_ERR(dentry);
@@ -697,7 +697,7 @@ out_putfd:
697out_err: 697out_err:
698 fd = error; 698 fd = error;
699out_upsem: 699out_upsem:
700 up(&mqueue_mnt->mnt_root->d_inode->i_sem); 700 mutex_unlock(&mqueue_mnt->mnt_root->d_inode->i_mutex);
701out_putname: 701out_putname:
702 putname(name); 702 putname(name);
703 return fd; 703 return fd;
@@ -714,7 +714,7 @@ asmlinkage long sys_mq_unlink(const char __user *u_name)
714 if (IS_ERR(name)) 714 if (IS_ERR(name))
715 return PTR_ERR(name); 715 return PTR_ERR(name);
716 716
717 down(&mqueue_mnt->mnt_root->d_inode->i_sem); 717 mutex_lock(&mqueue_mnt->mnt_root->d_inode->i_mutex);
718 dentry = lookup_one_len(name, mqueue_mnt->mnt_root, strlen(name)); 718 dentry = lookup_one_len(name, mqueue_mnt->mnt_root, strlen(name));
719 if (IS_ERR(dentry)) { 719 if (IS_ERR(dentry)) {
720 err = PTR_ERR(dentry); 720 err = PTR_ERR(dentry);
@@ -735,7 +735,7 @@ out_err:
735 dput(dentry); 735 dput(dentry);
736 736
737out_unlock: 737out_unlock:
738 up(&mqueue_mnt->mnt_root->d_inode->i_sem); 738 mutex_unlock(&mqueue_mnt->mnt_root->d_inode->i_mutex);
739 putname(name); 739 putname(name);
740 if (inode) 740 if (inode)
741 iput(inode); 741 iput(inode);