aboutsummaryrefslogtreecommitdiffstats
path: root/fs/devpts/inode.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 /fs/devpts/inode.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 'fs/devpts/inode.c')
-rw-r--r--fs/devpts/inode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index f2be44d4491f..bfb8a230bac9 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -130,7 +130,7 @@ static struct dentry *get_node(int num)
130{ 130{
131 char s[12]; 131 char s[12];
132 struct dentry *root = devpts_root; 132 struct dentry *root = devpts_root;
133 down(&root->d_inode->i_sem); 133 mutex_lock(&root->d_inode->i_mutex);
134 return lookup_one_len(s, root, sprintf(s, "%d", num)); 134 return lookup_one_len(s, root, sprintf(s, "%d", num));
135} 135}
136 136
@@ -161,7 +161,7 @@ int devpts_pty_new(struct tty_struct *tty)
161 if (!IS_ERR(dentry) && !dentry->d_inode) 161 if (!IS_ERR(dentry) && !dentry->d_inode)
162 d_instantiate(dentry, inode); 162 d_instantiate(dentry, inode);
163 163
164 up(&devpts_root->d_inode->i_sem); 164 mutex_unlock(&devpts_root->d_inode->i_mutex);
165 165
166 return 0; 166 return 0;
167} 167}
@@ -178,7 +178,7 @@ struct tty_struct *devpts_get_tty(int number)
178 dput(dentry); 178 dput(dentry);
179 } 179 }
180 180
181 up(&devpts_root->d_inode->i_sem); 181 mutex_unlock(&devpts_root->d_inode->i_mutex);
182 182
183 return tty; 183 return tty;
184} 184}
@@ -196,7 +196,7 @@ void devpts_pty_kill(int number)
196 } 196 }
197 dput(dentry); 197 dput(dentry);
198 } 198 }
199 up(&devpts_root->d_inode->i_sem); 199 mutex_unlock(&devpts_root->d_inode->i_mutex);
200} 200}
201 201
202static int __init init_devpts_fs(void) 202static int __init init_devpts_fs(void)