--- linux-2.6.18.i686/include/linux/namei.h.orig 2009-01-30 16:07:27.000000000 +0900 +++ linux-2.6.18.i686/include/linux/namei.h 2009-01-30 16:16:49.000000000 +0900 @@ -91,11 +91,7 @@ extern struct dentry * lookup_one_len_nd(const char *, struct dentry *, int, struct nameidata *); -static inline struct dentry *lookup_one_len(const char *name, - struct dentry *dir, int len) -{ - return lookup_one_len_nd(name, dir, len, NULL); -} +extern struct dentry *lookup_one_len(const char *name, struct dentry *dir, int len); extern int follow_down(struct vfsmount **, struct dentry **); extern int follow_up(struct vfsmount **, struct dentry **); --- linux-2.6.18.i686/fs/namei.c.orig 2009-01-30 16:10:02.000000000 +0900 +++ linux-2.6.18.i686/fs/namei.c 2009-01-30 16:14:30.000000000 +0900 @@ -1346,6 +1346,17 @@ return 0; } +struct dentry *lookup_one_len(const char *name, struct dentry *base, int len) +{ + struct qstr this; + int err; + + err = __lookup_one_len(name, &this, base, len); + if (err) + return ERR_PTR(err); + return __lookup_hash(&this, base, NULL); +} + struct dentry *lookup_one_len_nd(const char *name, struct dentry *base, int len, struct nameidata *nd) { @@ -2781,6 +2792,7 @@ EXPORT_SYMBOL(get_write_access); /* binfmt_aout */ EXPORT_SYMBOL(getname); EXPORT_SYMBOL(lock_rename); +EXPORT_SYMBOL(lookup_one_len); EXPORT_SYMBOL(lookup_one_len_nd); EXPORT_SYMBOL(page_follow_link_light); EXPORT_SYMBOL(page_put_link);