Messages in this thread Patches in this message | | | Date | Thu, 23 Jul 1998 11:03:31 -0400 | From | Bill Hawes <> | Subject | small patches for nfs, pipe inode initialization |
| |
I've attached a couple of one-line patches to fix inode initialization in fs/nfs/inode.c and fs/pipe.c. These turned up following a review of get_empty_inode() usage after ANK found a problem in socket inodes.
The nfs case is in the special code for handling NetApp snapshots, where we want an unhashed inode to avoid aliasing. The inode from get_empty_inode() needs i_flags set to the superblock s_flags.
In the pipe case the i_flags value should be 0, as none of the mount flags apply to pipes (AFAIK).
Regards, Bill--- linux-2.1.110/fs/nfs/inode.c.old Tue Jul 21 14:41:46 1998 +++ linux-2.1.110/fs/nfs/inode.c Wed Jul 22 21:36:51 1998 @@ -478,6 +486,7 @@ goto out; inode->i_sb = sb; inode->i_dev = sb->s_dev; + inode->i_flags = sb->s_flags; inode->i_ino = fattr->fileid; nfs_read_inode(inode); nfs_fill_inode(inode, fattr);--- linux-2.1.110/fs/pipe.c.old Fri Jul 3 10:32:33 1998 +++ linux-2.1.110/fs/pipe.c Wed Jul 22 21:50:21 1998 @@ -412,6 +412,7 @@ * that it already _is_ on the dirty list. */ inode->i_state = I_DIRTY; + inode->i_flags = 0; inode->i_mode = S_IFIFO | S_IRUSR | S_IWUSR; inode->i_uid = current->fsuid; inode->i_gid = current->fsgid; | |