Messages in this thread Patch in this message | | | Date | Mon, 10 Jan 2000 16:58:37 -0600 | From | David Grothe <> | Subject | init_special_inode in 2.3.35 |
| |
In kernel version 2.3.35 the routine ext2_read_inode in fs/ext2/inode.c reads in the "i_data" from the disk copy of the inode even for character special devices. Version 2.2.13 did not do this.
For character special devices it then calls the routine init_special_inode in fs/devices.c. This routine does not store anything into the inode field u.generic_ip. As a consequence, this field is non-zero when the character mode driver's open routine gets called. Not good.
The attached patch fixes the problem.
-- Dave --- devices.c.orig Mon Jan 10 16:39:22 2000 +++ devices.c Mon Jan 10 16:39:57 2000 @@ -382,6 +382,7 @@ if (S_ISCHR(mode)) { inode->i_op = &chrdev_inode_operations; inode->i_rdev = to_kdev_t(rdev); + inode->u.generic_ip = NULL; } else if (S_ISBLK(mode)) { inode->i_op = &blkdev_inode_operations; inode->i_rdev = to_kdev_t(rdev); | |