From: viro@www.linux.org.uk tty_paranoia_check() switched from kdev_t to struct inode. arch/parisc/kernel/ioctl32.c | 2 +- drivers/char/tty_io.c | 18 +++++++++--------- fs/compat_ioctl.c | 2 +- include/linux/tty.h | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff -puN arch/parisc/kernel/ioctl32.c~large-dev_t-02 arch/parisc/kernel/ioctl32.c --- 25/arch/parisc/kernel/ioctl32.c~large-dev_t-02 2003-08-26 18:28:45.000000000 -0700 +++ 25-akpm/arch/parisc/kernel/ioctl32.c 2003-08-26 18:28:45.000000000 -0700 @@ -1426,7 +1426,7 @@ static int vt_check(struct file *file) return -EINVAL; tty = (struct tty_struct *)file->private_data; - if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl")) + if (tty_paranoia_check(tty, inode, "tty_ioctl")) return -EINVAL; if (tty->driver->ioctl != vt_ioctl) diff -puN drivers/char/tty_io.c~large-dev_t-02 drivers/char/tty_io.c --- 25/drivers/char/tty_io.c~large-dev_t-02 2003-08-26 18:28:45.000000000 -0700 +++ 25-akpm/drivers/char/tty_io.c 2003-08-26 18:28:45.000000000 -0700 @@ -177,7 +177,7 @@ char *tty_name(struct tty_struct *tty, c EXPORT_SYMBOL(tty_name); -inline int tty_paranoia_check(struct tty_struct *tty, kdev_t device, +inline int tty_paranoia_check(struct tty_struct *tty, struct inode *inode, const char *routine) { #ifdef TTY_PARANOIA_CHECK @@ -187,11 +187,11 @@ inline int tty_paranoia_check(struct tty "Warning: null TTY for (%s) in %s\n"; if (!tty) { - printk(badtty, cdevname(device), routine); + printk(badtty, cdevname(inode->i_rdev), routine); return 1; } if (tty->magic != TTY_MAGIC) { - printk(badmagic, cdevname(device), routine); + printk(badmagic, cdevname(inode->i_rdev), routine); return 1; } #endif @@ -646,7 +646,7 @@ static ssize_t tty_read(struct file * fi tty = (struct tty_struct *)file->private_data; inode = file->f_dentry->d_inode; - if (tty_paranoia_check(tty, inode->i_rdev, "tty_read")) + if (tty_paranoia_check(tty, inode, "tty_read")) return -EIO; if (!tty || (test_bit(TTY_IO_ERROR, &tty->flags))) return -EIO; @@ -763,7 +763,7 @@ static ssize_t tty_write(struct file * f } tty = (struct tty_struct *)file->private_data; - if (tty_paranoia_check(tty, inode->i_rdev, "tty_write")) + if (tty_paranoia_check(tty, inode, "tty_write")) return -EIO; if (!tty || !tty->driver->write || (test_bit(TTY_IO_ERROR, &tty->flags))) return -EIO; @@ -1059,7 +1059,7 @@ static void release_dev(struct file * fi char buf[64]; tty = (struct tty_struct *)filp->private_data; - if (tty_paranoia_check(tty, filp->f_dentry->d_inode->i_rdev, "release_dev")) + if (tty_paranoia_check(tty, filp->f_dentry->d_inode, "release_dev")) return; check_tty_count(tty, "release_dev"); @@ -1439,7 +1439,7 @@ static unsigned int tty_poll(struct file struct tty_struct * tty; tty = (struct tty_struct *)filp->private_data; - if (tty_paranoia_check(tty, filp->f_dentry->d_inode->i_rdev, "tty_poll")) + if (tty_paranoia_check(tty, filp->f_dentry->d_inode, "tty_poll")) return 0; if (tty->ldisc.poll) @@ -1453,7 +1453,7 @@ static int tty_fasync(int fd, struct fil int retval; tty = (struct tty_struct *)filp->private_data; - if (tty_paranoia_check(tty, filp->f_dentry->d_inode->i_rdev, "tty_fasync")) + if (tty_paranoia_check(tty, filp->f_dentry->d_inode, "tty_fasync")) return 0; retval = fasync_helper(fd, filp, on, &tty->fasync); @@ -1727,7 +1727,7 @@ int tty_ioctl(struct inode * inode, stru int retval; tty = (struct tty_struct *)file->private_data; - if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl")) + if (tty_paranoia_check(tty, inode, "tty_ioctl")) return -EINVAL; real_tty = tty; diff -puN fs/compat_ioctl.c~large-dev_t-02 fs/compat_ioctl.c --- 25/fs/compat_ioctl.c~large-dev_t-02 2003-08-26 18:28:45.000000000 -0700 +++ 25-akpm/fs/compat_ioctl.c 2003-08-26 18:28:45.000000000 -0700 @@ -1573,7 +1573,7 @@ static int vt_check(struct file *file) return -EINVAL; tty = (struct tty_struct *)file->private_data; - if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl")) + if (tty_paranoia_check(tty, inode, "tty_ioctl")) return -EINVAL; if (tty->driver->ioctl != vt_ioctl) diff -puN include/linux/tty.h~large-dev_t-02 include/linux/tty.h --- 25/include/linux/tty.h~large-dev_t-02 2003-08-26 18:28:45.000000000 -0700 +++ 25-akpm/include/linux/tty.h 2003-08-26 18:28:45.000000000 -0700 @@ -367,7 +367,7 @@ extern int espserial_init(void); extern int macserial_init(void); extern int a2232board_init(void); -extern int tty_paranoia_check(struct tty_struct *tty, kdev_t device, +extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode, const char *routine); extern char *tty_name(struct tty_struct *tty, char *buf); extern void tty_wait_until_sent(struct tty_struct * tty, long timeout); _