Index: oldkernel/linux/fs/nfsd/nfsfh.c diff -u linux/fs/nfsd/nfsfh.c:1.2 linux/fs/nfsd/nfsfh.c:1.3 --- linux/fs/nfsd/nfsfh.c:1.2 Thu Jun 1 15:37:13 2000 +++ linux/fs/nfsd/nfsfh.c Thu Jun 1 17:06:35 2000 @@ -1159,6 +1159,18 @@ error = nfserr_noent; dentry = find_fh_dentry(fh); if (!dentry) { + /* Usually inode number 0 shouldn't appear in any + filehandle. We want to know who has it. */ + if (!fh->fh_ino || !fh->fh_dirino) + printk("fh_verify: not found %s: exp %s/%u file (%s/%u dir %u) coookie 0x%lx, generation 0x%x\n", + rqstp->rq_client->cl_ident, + kdevname(fh->fh_xdev), + fh->fh_xino, + kdevname(fh->fh_dev), + fh->fh_ino, + fh->fh_dirino, + (long) fh->fh_dcookie, + fh->fh_generation); goto out; } if (IS_ERR(dentry)) { @@ -1196,8 +1208,8 @@ filehandle to the client. We use fh->fh_dcookie to indicate if fh->fh_generation is set or not. If fh->fh_dcookie is not set, don't return stale filehandle. */ - if (inode->i_generation != fh->fh_generation) { - if (fh->fh_dcookie) { + if (fh->fh_dcookie) { + if (inode->i_generation != fh->fh_generation) { dprintk("fh_verify: Bad version %lu %u %u: 0x%x, 0x%x\n", inode->i_ino, inode->i_generation, @@ -1206,14 +1218,14 @@ nfsdstats.fh_stale++; goto out; } - else { - /* We get here when inode is fetched by other - threads. We just use what is in there. */ - fh->fh_ino = ino_t_to_u32(inode->i_ino); - fh->fh_generation = inode->i_generation; - fh->fh_dcookie = (struct dentry *)0xfeebbaca; - nfsdstats.fh_concurrent++; - } + } + else { + /* We get here when inode is fetched by other + threads. We just use what is in there. */ + fh->fh_ino = ino_t_to_u32(inode->i_ino); + fh->fh_generation = inode->i_generation; + fh->fh_dcookie = (struct dentry *)0xfeebbaca; + nfsdstats.fh_concurrent++; } exp = fhp->fh_export; if (type > 0 && (inode->i_mode & S_IFMT) != type) { @@ -1306,7 +1318,6 @@ } fh_init(fhp); - fhp->fh_handle.fh_dcookie = dentry; if (inode) { fhp->fh_handle.fh_ino = ino_t_to_u32(inode->i_ino); fhp->fh_handle.fh_generation = inode->i_generation;