[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:
committed by
Ingo Molnar
parent
794ee1baee
commit
1b1dcc1b57
@@ -177,9 +177,9 @@ find_exported_dentry(struct super_block *sb, void *obj, void *parent,
|
||||
struct dentry *ppd;
|
||||
struct dentry *npd;
|
||||
|
||||
down(&pd->d_inode->i_sem);
|
||||
mutex_lock(&pd->d_inode->i_mutex);
|
||||
ppd = CALL(nops,get_parent)(pd);
|
||||
up(&pd->d_inode->i_sem);
|
||||
mutex_unlock(&pd->d_inode->i_mutex);
|
||||
|
||||
if (IS_ERR(ppd)) {
|
||||
err = PTR_ERR(ppd);
|
||||
@@ -201,9 +201,9 @@ find_exported_dentry(struct super_block *sb, void *obj, void *parent,
|
||||
break;
|
||||
}
|
||||
dprintk("find_exported_dentry: found name: %s\n", nbuf);
|
||||
down(&ppd->d_inode->i_sem);
|
||||
mutex_lock(&ppd->d_inode->i_mutex);
|
||||
npd = lookup_one_len(nbuf, ppd, strlen(nbuf));
|
||||
up(&ppd->d_inode->i_sem);
|
||||
mutex_unlock(&ppd->d_inode->i_mutex);
|
||||
if (IS_ERR(npd)) {
|
||||
err = PTR_ERR(npd);
|
||||
dprintk("find_exported_dentry: lookup failed: %d\n", err);
|
||||
@@ -242,9 +242,9 @@ find_exported_dentry(struct super_block *sb, void *obj, void *parent,
|
||||
struct dentry *nresult;
|
||||
err = CALL(nops,get_name)(target_dir, nbuf, result);
|
||||
if (!err) {
|
||||
down(&target_dir->d_inode->i_sem);
|
||||
mutex_lock(&target_dir->d_inode->i_mutex);
|
||||
nresult = lookup_one_len(nbuf, target_dir, strlen(nbuf));
|
||||
up(&target_dir->d_inode->i_sem);
|
||||
mutex_unlock(&target_dir->d_inode->i_mutex);
|
||||
if (!IS_ERR(nresult)) {
|
||||
if (nresult->d_inode) {
|
||||
dput(result);
|
||||
|
Reference in New Issue
Block a user