aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-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);