devpts: Coding style clean up
Just nail the oddments now while this code is being touched Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
@@ -311,7 +311,7 @@ devpts_fill_super(struct super_block *s, void *data, int silent)
|
|||||||
if (s->s_root)
|
if (s->s_root)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
printk("devpts: get root dentry failed\n");
|
printk(KERN_ERR "devpts: get root dentry failed\n");
|
||||||
iput(inode);
|
iput(inode);
|
||||||
|
|
||||||
free_fsi:
|
free_fsi:
|
||||||
@@ -542,9 +542,8 @@ int devpts_new_index(struct inode *ptmx_inode)
|
|||||||
int ida_ret;
|
int ida_ret;
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
if (!ida_pre_get(&fsi->allocated_ptys, GFP_KERNEL)) {
|
if (!ida_pre_get(&fsi->allocated_ptys, GFP_KERNEL))
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
mutex_lock(&allocated_ptys_lock);
|
mutex_lock(&allocated_ptys_lock);
|
||||||
ida_ret = ida_get_new(&fsi->allocated_ptys, &index);
|
ida_ret = ida_get_new(&fsi->allocated_ptys, &index);
|
||||||
@@ -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 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;
|
struct tty_driver *driver = tty->driver;
|
||||||
dev_t device = MKDEV(driver->major, driver->minor_start+number);
|
dev_t device = MKDEV(driver->major, driver->minor_start+number);
|
||||||
struct dentry *dentry;
|
struct dentry *dentry;
|
||||||
@@ -644,11 +644,10 @@ void devpts_pty_kill(struct tty_struct *tty)
|
|||||||
if (dentry) {
|
if (dentry) {
|
||||||
inode->i_nlink--;
|
inode->i_nlink--;
|
||||||
d_delete(dentry);
|
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:
|
out:
|
||||||
mutex_unlock(&root->d_inode->i_mutex);
|
mutex_unlock(&root->d_inode->i_mutex);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user