X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fchar%2Fn_tty.c;h=6ac3ca4c723c2c660c5d084b9c7834035767fbb5;hb=ccf352894ceef79d40d015e1deee4c46c3aa42ed;hp=603b9ade5eb089f16f041fc15e4876417a6c1505;hpb=0a1340c185734a57fbf4775927966ad4a1347b02;p=powerpc.git diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c index 603b9ade5e..6ac3ca4c72 100644 --- a/drivers/char/n_tty.c +++ b/drivers/char/n_tty.c @@ -579,8 +579,8 @@ static void eraser(unsigned char c, struct tty_struct *tty) static inline void isig(int sig, struct tty_struct *tty, int flush) { - if (tty->pgrp > 0) - kill_pg(tty->pgrp, sig, 1); + if (tty->pgrp) + kill_pgrp(tty->pgrp, sig, 1); if (flush || !L_NOFLSH(tty)) { n_tty_flush_buffer(tty); if (tty->driver->flush_buffer) @@ -994,7 +994,7 @@ int is_ignored(int sig) * when the ldisc is closed. */ -static void n_tty_set_termios(struct tty_struct *tty, struct termios * old) +static void n_tty_set_termios(struct tty_struct *tty, struct ktermios * old) { if (!tty) return; @@ -1151,7 +1151,6 @@ static int copy_from_read_buf(struct tty_struct *tty, n = min(*nr, n); spin_unlock_irqrestore(&tty->read_lock, flags); if (n) { - mb(); retval = copy_to_user(*b, &tty->read_buf[tty->read_tail], n); n -= retval; spin_lock_irqsave(&tty->read_lock, flags); @@ -1185,13 +1184,13 @@ static int job_control(struct tty_struct *tty, struct file *file) /* don't stop on /dev/console */ if (file->f_op->write != redirected_tty_write && current->signal->tty == tty) { - if (tty->pgrp <= 0) - printk("read_chan: tty->pgrp <= 0!\n"); - else if (process_group(current) != tty->pgrp) { + if (!tty->pgrp) + printk("read_chan: no tty->pgrp!\n"); + else if (task_pgrp(current) != tty->pgrp) { if (is_ignored(SIGTTIN) || - is_orphaned_pgrp(process_group(current))) + is_current_pgrp_orphaned()) return -EIO; - kill_pg(process_group(current), SIGTTIN, 1); + kill_pgrp(task_pgrp(current), SIGTTIN, 1); return -ERESTARTSYS; } }