[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>
This commit is contained in:
Jes Sorensen 2006-01-09 15:59:24 -08:00 committed by Ingo Molnar
parent 794ee1baee
commit 1b1dcc1b57
113 changed files with 563 additions and 573 deletions

View file

@ -660,7 +660,7 @@ asmlinkage long sys_mq_open(const char __user *u_name, int oflag, mode_t mode,
if (fd < 0)
goto out_putname;
down(&mqueue_mnt->mnt_root->d_inode->i_sem);
mutex_lock(&mqueue_mnt->mnt_root->d_inode->i_mutex);
dentry = lookup_one_len(name, mqueue_mnt->mnt_root, strlen(name));
if (IS_ERR(dentry)) {
error = PTR_ERR(dentry);
@ -697,7 +697,7 @@ out_putfd:
out_err:
fd = error;
out_upsem:
up(&mqueue_mnt->mnt_root->d_inode->i_sem);
mutex_unlock(&mqueue_mnt->mnt_root->d_inode->i_mutex);
out_putname:
putname(name);
return fd;
@ -714,7 +714,7 @@ asmlinkage long sys_mq_unlink(const char __user *u_name)
if (IS_ERR(name))
return PTR_ERR(name);
down(&mqueue_mnt->mnt_root->d_inode->i_sem);
mutex_lock(&mqueue_mnt->mnt_root->d_inode->i_mutex);
dentry = lookup_one_len(name, mqueue_mnt->mnt_root, strlen(name));
if (IS_ERR(dentry)) {
err = PTR_ERR(dentry);
@ -735,7 +735,7 @@ out_err:
dput(dentry);
out_unlock:
up(&mqueue_mnt->mnt_root->d_inode->i_sem);
mutex_unlock(&mqueue_mnt->mnt_root->d_inode->i_mutex);
putname(name);
if (inode)
iput(inode);