lkml.org 
[lkml]   [2000]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectinit_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);
\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.026 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site