diff --git a/fs/namei.c b/fs/namei.c
index 3b993db..8297afa 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1288,8 +1631,13 @@ int __user_path_lookup_open(const char __user *name, unsigned int lookup_flags,
 	return err;
 }
 
+#ifdef CONFIG_AUFS_LHASH_PATCH
+struct dentry *__lookup_hash(struct qstr *name,
+		struct dentry *base, struct nameidata *nd)
+#else
 static struct dentry *__lookup_hash(struct qstr *name,
 		struct dentry *base, struct nameidata *nd)
+#endif
 {
 	struct dentry *dentry;
 	struct inode *inode;
@@ -2806,6 +3408,9 @@ EXPORT_SYMBOL(follow_up);
 EXPORT_SYMBOL(get_write_access); /* binfmt_aout */
 EXPORT_SYMBOL(getname);
 EXPORT_SYMBOL(lock_rename);
+#ifdef CONFIG_AUFS_LHASH_PATCH
+EXPORT_SYMBOL(__lookup_hash);
+#endif
 EXPORT_SYMBOL(lookup_one_len);
 EXPORT_SYMBOL(page_follow_link_light);
 EXPORT_SYMBOL(page_put_link);
diff --git a/include/linux/namei.h b/include/linux/namei.h
index 4cb4f8d..e2c4045 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -81,6 +95,9 @@ extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry
 extern struct file *nameidata_to_filp(struct nameidata *nd, int flags);
 extern void release_open_intent(struct nameidata *);
 
+#ifdef CONFIG_AUFS_LHASH_PATCH
+struct dentry * __lookup_hash(struct qstr *name, struct dentry * base, struct nameidata *nd);
+#endif
 extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
 extern struct dentry *lookup_one_noperm(const char *, struct dentry *);
 
