aboutsummaryrefslogtreecommitdiffstats
path: root/fs/devpts
diff options
context:
space:
mode:
Diffstat (limited to 'fs/devpts')
-rw-r--r--fs/devpts/inode.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index 488eb424f662..638db9b769ac 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -177,7 +177,7 @@ static struct dentry *get_node(int num)
177 return lookup_one_len(s, root, sprintf(s, "%d", num)); 177 return lookup_one_len(s, root, sprintf(s, "%d", num));
178} 178}
179 179
180int devpts_new_index(void) 180int devpts_new_index(struct inode *ptmx_inode)
181{ 181{
182 int index; 182 int index;
183 int ida_ret; 183 int ida_ret;
@@ -205,14 +205,14 @@ retry:
205 return index; 205 return index;
206} 206}
207 207
208void devpts_kill_index(int idx) 208void devpts_kill_index(struct inode *ptmx_inode, int idx)
209{ 209{
210 mutex_lock(&allocated_ptys_lock); 210 mutex_lock(&allocated_ptys_lock);
211 ida_remove(&allocated_ptys, idx); 211 ida_remove(&allocated_ptys, idx);
212 mutex_unlock(&allocated_ptys_lock); 212 mutex_unlock(&allocated_ptys_lock);
213} 213}
214 214
215int devpts_pty_new(struct tty_struct *tty) 215int devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty)
216{ 216{
217 int number = tty->index; /* tty layer puts index from devpts_new_index() in here */ 217 int number = tty->index; /* tty layer puts index from devpts_new_index() in here */
218 struct tty_driver *driver = tty->driver; 218 struct tty_driver *driver = tty->driver;
@@ -245,7 +245,7 @@ int devpts_pty_new(struct tty_struct *tty)
245 return 0; 245 return 0;
246} 246}
247 247
248struct tty_struct *devpts_get_tty(int number) 248struct tty_struct *devpts_get_tty(struct inode *pts_inode, int number)
249{ 249{
250 struct dentry *dentry = get_node(number); 250 struct dentry *dentry = get_node(number);
251 struct tty_struct *tty; 251 struct tty_struct *tty;
@@ -262,8 +262,9 @@ struct tty_struct *devpts_get_tty(int number)
262 return tty; 262 return tty;
263} 263}
264 264
265void devpts_pty_kill(int number) 265void devpts_pty_kill(struct tty_struct *tty)
266{ 266{
267 int number = tty->index;
267 struct dentry *dentry = get_node(number); 268 struct dentry *dentry = get_node(number);
268 269
269 if (!IS_ERR(dentry)) { 270 if (!IS_ERR(dentry)) {