Messages in this thread | | | Date | Wed, 1 Oct 2003 16:41:36 +0200 | From | Mikael Pettersson <> | Subject | Re: 2.6: why no EXPORT_SYMBOL of get_sb_pseudo()? |
| |
Mikael Pettersson writes: > viro@parcelfarce.linux.theplanet.co.uk writes: > > On Wed, Oct 01, 2003 at 11:04:30AM +0200, Mikael Pettersson wrote: > > > fs/libfs.c:get_sb_pseudo() isn't exported to modules, > > > but a lot of the other stuff in fs/libfs.c is. > > > > > > Is there a particular reason for this or just an oversight? > > > > > > Making a private copy of get_sb_pseudo()'s definition works > > > in a module, but that's not exactly productive use of > > > programmer time or source and object code space. > > > > Are you really sure that get_sb_pseudo() is what you need? It might be > > possible, but I suspect that simple_fill_super() would be the right thing > > to use. Care to give details? > > I have a pseudo fs to support special files constructed and > returned as the result of certain operations in the module. > > This is very very similar to what e.g. pipefs does, so the > fs implementation is closely modelled after fs/pipe.c. And > since pipefs, futexes, and a number of other pseudo fs:s in > the kernel all use get_sb_pseudo() in their ->get_sb method, > I figured I should do the same.
I've now checked what simple_fill_super() does, and it doesn't seem like a valid replacement for get_sb_pseudo(), especially since it allocates a root directory inode and populates it. This is clearly not needed for a pseudo fs that won't be mounted.
I can submit a trivial patch to export get_sb_pseudo(), but it may fare better with Linus if Al ACKs it first.
/Mikael - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |