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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:16 EST