Re: Inode question

Dave Kleikamp
2004-07-21T20:56:30Z

On Wed, 2004-07-21 at 15:46, sankarshana rao wrote:
> Thx for the reply...
> When I try to call lookup() from my kernel module, it
> gives undefined symbol error during INSMOD..
> any clues???

Not lookup, but path_lookup.

#include <linux/namei.h>
struct nameidata nd;
rc = path_lookup(path, LOOKUP_FOLLOW, &nd);
if (rc)
file not found
else
inum = nd.dentry->d_inode->i_ino;
path_release(&nd);

> --- Dave Kleikamp <shaggy@austin.ibm.com> wrote:
> > On Wed, 2004-07-21 at 13:39, sankarshana rao wrote:
> > > Hi,
> > > I want to call namei() function in order to derive
> > an
> > > inode from a path name. Can I do this inside a
> > kernel
> > > module???
> >
> > >From a kernel module, you should probably call
> > path_lookup().
> >
> > Shaggy
--
David Kleikamp
IBM Linux Technology Center