I am looking at the "bad inode number: 0" problem. I am somewhat
puzzled by the following code from lookup_inode () in fs/nfsd/nfsfh.c:
if (dirino == root_ino) {
dentry = dget(root);
}
else {
result = ERR_PTR(-ENOENT);
dir = iget_in_use(sb, dirino);
if (!dir)
goto out_root;
dentry = d_alloc_root(dir, NULL);
if (!dentry)
goto out_iput;
}
/*
* Get the name for this inode and the next parent inode.
*/
dirent.ino = ino;
error = get_parent_ino(dentry, &dirent);
result = ERR_PTR(error);
dput(dentry);
If I am right, it calls d_alloc_root () with some non-root inode
to create a temporary dentry. Will that cause problem since that
dentry will map "/" to the inode which is not the root inode?
-- H.J. Lu (hjl@gnu.org)- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:21 EST