The bug was closed but I don't think it's already fixed even in the latest 10.7.2. We get some time to make a cleaner patch as below and also attached just in case anybody might need it. ---- The scenario is:
The problems is the v_name and also v_parent are not updated in this Mac box during nfs_nget.
diff -urp xnu-1699.24.8/bsd/nfs/nfs_node.c xnu-1699.24.8-fengshuo//bsd/nfs/nfs_node.c
--- xnu-1699.24.8/bsd/nfs/nfs_node.c 2011-02-09 06:06:24.000000000 +0800
+++ xnu-1699.24.8-fengshuo//bsd/nfs/nfs_node.c 2012-01-20 17:13:17.000000000 +0800
@@ -233,6 +233,16 @@ loop:
} else {
if (dnp && cnp && (flags & NG_MAKEENTRY))
cache_enter(NFSTOV(dnp), vp, cnp);
+
+ if (dnp && cnp && (vp != NFSTOV(dnp))) {
+ int update_flags = 0;
+ if (vp->v_name != cnp->cn_nameptr)
+ update_flags |= VNODE_UPDATE_NAME;
+ if (vp->v_parent != NFSTOV(dnp))
+ update_flags |= VNODE_UPDATE_PARENT;
+ if (update_flags)
+ vnode_update_identity(vp, NFSTOV(dnp), cnp->cn_nameptr, cnp->cn_namelen, 0, update_flags);
+ }
*npp = np;
}
FSDBG_BOT(263, dnp, *npp, 0xcace0000, error);