Re: [patch 6/8] inode-diet: Move i_cindex from struct inode to struct file

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

 



On Mon, Jul 03, 2006 at 10:05:32AM +0100, Christoph Hellwig wrote:
> On Sun, Jul 02, 2006 at 08:53:39PM -0400, Theodore Ts'o wrote:
> > inode.i_cindex isn't initialized until the character device is opened
> > anyway, and there are far more struct inodes in memory than there are
> > struct file.  So move the cindex field to file.f_cindex, and change
> > the one(!) user of cindex to use file pointer, which is in fact simpler.
> 
> I think you got a pretty clear NACK from Al on this one.
> 

I explained my reasoning to him --- that inode.i_cindex isn't
initialized until after the VFS-specific char-open is called, so you
can never depend on index.i_cindex being valid except in char device
driver's open method --- and that function gets passed a file pointer
as well as an index pointer.  So the clean up that Al wants to do can
just as easily be done by having the device drivers use file->f_cindex
instead of inode->i_cindex.

						- 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