--- ./fs/namei.c.orig 2005-03-23 21:34:32 +0100 +++ ./fs/namei.c 2005-03-25 19:59:30 +0100 @@ -616,9 +616,22 @@ int follow_down(struct vfsmount **mnt, s { return __follow_down(mnt,dentry); } + +static void dump_dpath(char *str, struct dentry *de, struct vfsmount *mnt) +{ + static char buf[1024], *p; + + p = d_path(de, mnt, buf, sizeof(buf)); + if (IS_ERR(p)) + printk("%s\t[%p,%p] \n", str, mnt, de); + else + printk("%s\t[%p,%p] »%s«\n", str, mnt, de, p); +} + static inline void follow_dotdot(struct vfsmount **mnt, struct dentry **dentry) { + dump_dpath("follow_dotdot()", *dentry, *mnt); while(1) { struct vfsmount *parent; struct dentry *old = *dentry; @@ -626,6 +639,7 @@ static inline void follow_dotdot(struct read_lock(¤t->fs->lock); if (*dentry == current->fs->root && *mnt == current->fs->rootmnt) { + printk(" ··· current root\n"); read_unlock(¤t->fs->lock); break; } @@ -634,6 +648,7 @@ static inline void follow_dotdot(struct if (*dentry != (*mnt)->mnt_root) { *dentry = dget((*dentry)->d_parent); spin_unlock(&dcache_lock); + dump_dpath(" ··· parent", *dentry, *mnt); dput(old); break; } @@ -642,15 +657,18 @@ static inline void follow_dotdot(struct parent = (*mnt)->mnt_parent; if (parent == *mnt) { spin_unlock(&vfsmount_lock); + dump_dpath(" ··· mnt_parent", *dentry, parent); break; } mntget(parent); *dentry = dget((*mnt)->mnt_mountpoint); spin_unlock(&vfsmount_lock); + dump_dpath(" ··· mountpoint", *dentry, parent); dput(old); mntput(*mnt); *mnt = parent; } + printk(" ··· follow_mount()\n"); follow_mount(mnt, dentry); }