Loading fs/devpts/inode.c +26 −27 Original line number Diff line number Diff line Loading @@ -311,7 +311,7 @@ devpts_fill_super(struct super_block *s, void *data, int silent) if (s->s_root) return 0; printk("devpts: get root dentry failed\n"); printk(KERN_ERR "devpts: get root dentry failed\n"); iput(inode); free_fsi: Loading Loading @@ -542,9 +542,8 @@ int devpts_new_index(struct inode *ptmx_inode) int ida_ret; retry: if (!ida_pre_get(&fsi->allocated_ptys, GFP_KERNEL)) { if (!ida_pre_get(&fsi->allocated_ptys, GFP_KERNEL)) return -ENOMEM; } mutex_lock(&allocated_ptys_lock); ida_ret = ida_get_new(&fsi->allocated_ptys, &index); Loading Loading @@ -576,7 +575,8 @@ void devpts_kill_index(struct inode *ptmx_inode, int idx) int devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty) { int number = tty->index; /* tty layer puts index from devpts_new_index() in here */ /* tty layer puts index from devpts_new_index() in here */ int number = tty->index; struct tty_driver *driver = tty->driver; dev_t device = MKDEV(driver->major, driver->minor_start+number); struct dentry *dentry; Loading Loading @@ -644,11 +644,10 @@ void devpts_pty_kill(struct tty_struct *tty) if (dentry) { inode->i_nlink--; d_delete(dentry); dput(dentry); // d_alloc_name() in devpts_pty_new() dput(dentry); /* d_alloc_name() in devpts_pty_new() */ } dput(dentry); // d_find_alias above dput(dentry); /* d_find_alias above */ out: mutex_unlock(&root->d_inode->i_mutex); } Loading Loading
fs/devpts/inode.c +26 −27 Original line number Diff line number Diff line Loading @@ -311,7 +311,7 @@ devpts_fill_super(struct super_block *s, void *data, int silent) if (s->s_root) return 0; printk("devpts: get root dentry failed\n"); printk(KERN_ERR "devpts: get root dentry failed\n"); iput(inode); free_fsi: Loading Loading @@ -542,9 +542,8 @@ int devpts_new_index(struct inode *ptmx_inode) int ida_ret; retry: if (!ida_pre_get(&fsi->allocated_ptys, GFP_KERNEL)) { if (!ida_pre_get(&fsi->allocated_ptys, GFP_KERNEL)) return -ENOMEM; } mutex_lock(&allocated_ptys_lock); ida_ret = ida_get_new(&fsi->allocated_ptys, &index); Loading Loading @@ -576,7 +575,8 @@ void devpts_kill_index(struct inode *ptmx_inode, int idx) int devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty) { int number = tty->index; /* tty layer puts index from devpts_new_index() in here */ /* tty layer puts index from devpts_new_index() in here */ int number = tty->index; struct tty_driver *driver = tty->driver; dev_t device = MKDEV(driver->major, driver->minor_start+number); struct dentry *dentry; Loading Loading @@ -644,11 +644,10 @@ void devpts_pty_kill(struct tty_struct *tty) if (dentry) { inode->i_nlink--; d_delete(dentry); dput(dentry); // d_alloc_name() in devpts_pty_new() dput(dentry); /* d_alloc_name() in devpts_pty_new() */ } dput(dentry); // d_find_alias above dput(dentry); /* d_find_alias above */ out: mutex_unlock(&root->d_inode->i_mutex); } Loading