diff options
author | Jes Sorensen <jes@sgi.com> | 2006-01-09 15:59:24 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@hera.kernel.org> | 2006-01-09 15:59:24 -0800 |
commit | 1b1dcc1b57a49136f118a0f16367256ff9994a69 (patch) | |
tree | b0b36d4f41d28c9d6514fb309d33c1a084d6309b /fs/relayfs | |
parent | 794ee1baee1c26be40410233e6c20bceb2b03c08 (diff) | |
download | linux-1b1dcc1b57a49136f118a0f16367256ff9994a69.tar.bz2 |
[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 'fs/relayfs')
-rw-r--r-- | fs/relayfs/inode.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/relayfs/inode.c b/fs/relayfs/inode.c index 7b7f2cb5f0e1..383523011aad 100644 --- a/fs/relayfs/inode.c +++ b/fs/relayfs/inode.c @@ -109,7 +109,7 @@ static struct dentry *relayfs_create_entry(const char *name, } parent = dget(parent); - down(&parent->d_inode->i_sem); + mutex_lock(&parent->d_inode->i_mutex); d = lookup_one_len(name, parent, strlen(name)); if (IS_ERR(d)) { d = NULL; @@ -139,7 +139,7 @@ release_mount: simple_release_fs(&relayfs_mount, &relayfs_mount_count); exit: - up(&parent->d_inode->i_sem); + mutex_unlock(&parent->d_inode->i_mutex); dput(parent); return d; } @@ -204,7 +204,7 @@ int relayfs_remove(struct dentry *dentry) return -EINVAL; parent = dget(parent); - down(&parent->d_inode->i_sem); + mutex_lock(&parent->d_inode->i_mutex); if (dentry->d_inode) { if (S_ISDIR(dentry->d_inode->i_mode)) error = simple_rmdir(parent->d_inode, dentry); @@ -215,7 +215,7 @@ int relayfs_remove(struct dentry *dentry) } if (!error) dput(dentry); - up(&parent->d_inode->i_sem); + mutex_unlock(&parent->d_inode->i_mutex); dput(parent); if (!error) @@ -476,7 +476,7 @@ static ssize_t relay_file_read(struct file *filp, ssize_t ret = 0; void *from; - down(&inode->i_sem); + mutex_lock(&inode->i_mutex); if(!relay_file_read_avail(buf, *ppos)) goto out; @@ -494,7 +494,7 @@ static ssize_t relay_file_read(struct file *filp, relay_file_read_consume(buf, read_start, count); *ppos = relay_file_read_end_pos(buf, read_start, count); out: - up(&inode->i_sem); + mutex_unlock(&inode->i_mutex); return ret; } |