struct tty_struct *pty = tty->link;
/* For a PTY we need to lock the tty side */
- down_write(&tty->termios_rwsem);
+ mutex_lock(&tty->winsize_mutex);
if (!memcmp(ws, &tty->winsize, sizeof(*ws)))
goto done;
tty->winsize = *ws;
pty->winsize = *ws; /* Never used so will go away soon */
done:
- up_write(&tty->termios_rwsem);
+ mutex_unlock(&tty->winsize_mutex);
return 0;
}