small patches for nfs, pipe inode initialization

Bill Hawes (whawes@star.net)
Thu, 23 Jul 1998 11:03:31 -0400


This is a multi-part message in MIME format.
--------------678E6F18BB5F764CEC2EE817
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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
--------------678E6F18BB5F764CEC2EE817
Content-Type: text/plain; charset=us-ascii; name="nfs_inode110-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="nfs_inode110-patch"

--- 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);

--------------678E6F18BB5F764CEC2EE817
Content-Type: text/plain; charset=us-ascii; name="pipe_inode110-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="pipe_inode110-patch"

--- 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;

--------------678E6F18BB5F764CEC2EE817--

-
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.altern.org/andrebalsa/doc/lkml-faq.html