I'm not sure there is a clean fix to this, but one proposal is
attached below: it causes __emul_lookup_dentry() to ignore the
alternate root for paths that resolve to a directory. This obviously
could create other problems, but I suspect there is no solution that
works 100% in all cases (the fundamental being that we now have two
different root nodes...).
Comments?
--david
PS: I cc'd all the platform maintainers that use a non-NULL
emul_prefix, except for Dave Miller who in private mail indicated
that he doesn't care about this problem
--- fs/namei.c~ Sat Jul 21 20:20:40 2001
+++ fs/namei.c Mon Sep 17 15:10:20 2001
@@ -604,10 +604,14 @@
static int __emul_lookup_dentry(const char *name, struct nameidata *nd)
{
if (path_walk(name, nd))
- return 0;
+ return 0; /* something went wrong... */
- if (!nd->dentry->d_inode) {
+ if (!nd->dentry->d_inode || S_ISDIR(nd->dentry->d_inode->i_mode)) {
struct nameidata nd_root;
+ /*
+ * NAME was not found in alternate root or it's a directory. Try to find
+ * it in the normal root:
+ */
nd_root.last_type = LAST_ROOT;
nd_root.flags = nd->flags;
read_lock(¤t->fs->lock);
-
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/