Re: [PATCH] tty: Remove __GFP_NOFAIL from tty_add_file()

From: David Rientjes
Date: Mon Aug 23 2010 - 17:07:15 EST


On Mon, 23 Aug 2010, Pekka Enberg wrote:

> diff --git a/drivers/char/pty.c b/drivers/char/pty.c
> index c350d01..bc577ac 100644
> --- a/drivers/char/pty.c
> +++ b/drivers/char/pty.c
> @@ -676,7 +676,9 @@ static int ptmx_open(struct inode *inode, struct file *filp)
>
> set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */
>
> - tty_add_file(tty, filp);
> + retval = tty_add_file(tty, filp);
> + if (retval)
> + goto out1;
>
> retval = devpts_pty_new(inode, tty->link);
> if (retval)

This needs devpts_kill_index() to reverse the successful
devpts_new_index(), so I think it should be "goto out" and not "goto
out1".
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/