Re: [RFC] [PATCH 2/8] inode-diet: Move i_pipe into a union

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 19, 2006 at 07:19:26PM +0200, Jan Engelhardt wrote:
> 
> >Move the i_pipe pointer into a union that will be shared with i_bdev
> >and i_cdev.
> 
> >+	union {
> >+		struct pipe_inode_info	*i_pipe;
> >+	};
> 
> Since in the next patch you did
> 
> -       if (inode->i_bdev)
> +       if (S_ISBLK(inode->i_mode) && inode->i_bdev)
> 
> I am just asking, for clarity, if there were any similar lines for 
> pipes that should now read S_IFIFO(inode->i_mode) too, like for bdevs.

Nope, I didn't see any, and I did audit all of the places that used
i_pipe.  At least in the mainline kernel, all of the places which used
i_pipe were in places were we knew already that we were dealing with a
pipe.  

As was mentioned in earlier comment, this will be problematic for the
out-of-tree System V Streams code, which hijacks i_pipe as another
place to store 4 bytes of random data needed for the Streams code (I
believe they needed a pointer to the stream head -- the v_str pointer
in a legacy Unix system's inode).  But, that is an out-of-tree kernel
module, and it's a clear abuse of the i_pipe element in any case.

							- Ted
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux