lkml.org 
[lkml]   [2000]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectbad inode number: 0 and NFS
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/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.048 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site