Commit 835aa440 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

devpts: Coding style clean up

Just nail the oddments now while this code is being touched
Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 784c4d8b
...@@ -311,7 +311,7 @@ devpts_fill_super(struct super_block *s, void *data, int silent) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment