tech-kern archive

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

Re: factoring out the change_root() and making exporting change_{root,dir}() as interface

Christoph Badura wrote:

 > -static int
 > +int
 >  change_dir(struct nameidata *ndp, struct lwp *l)
 >  {

Is it feasible to adjust this to pass a vnode instead of nameidata?

change_dir() actually does the namei() lookup currently.
I suppose it's possible to change the interface by moving a small bit
of common code out of it.  But it is convenient as it stands.
The place were I use it, would be the third calling site and it needs to
do the namei(), too.  Therefore i didn't change it.  I don't care much
either way, though.

Please provide a use case before exporting functions. I don't think
we can judge whether the export is necessary or not without seeing
what it's going to be used for... especially when in one export you
are bypassing the security infrastructure and in the other you are
exporting a function that does not do what it name implies it will.


Home | Main Index | Thread Index | Old Index