summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_vnops.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2009-03-24 23:16:48 +0000
committerrwatson <rwatson@FreeBSD.org>2009-03-24 23:16:48 +0000
commit8f6024ae234d5365fe6142a4d7ad85570839342b (patch)
treeea04b6367ad730ed0878d25268836432449fbb75 /sys/nfsclient/nfs_vnops.c
parent71ae7c9315fc12283d86f2791327d9cc7f74c97c (diff)
downloadFreeBSD-src-8f6024ae234d5365fe6142a4d7ad85570839342b.zip
FreeBSD-src-8f6024ae234d5365fe6142a4d7ad85570839342b.tar.gz
Fix two bugs in DTrace tracing of accesscache and attrcache load events:
- Trace non-error loads into the access cache once, not zero times or twice. - Sometimes attr cache loads fail due to a race, in which case they are aborted leading to an invalidation; in this case, trace only the flush, not a load. MFC after: 1 month Sponsored by: Google, Inc.
Diffstat (limited to 'sys/nfsclient/nfs_vnops.c')
-rw-r--r--sys/nfsclient/nfs_vnops.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index 3592280..d201258 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -339,7 +339,12 @@ nfs3_access_otw(struct vnode *vp, int wmode, struct thread *td,
}
m_freem(mrep);
nfsmout:
- KDTRACE_NFS_ACCESSCACHE_LOAD_DONE(vp, cred->cr_uid, 0, error);
+#ifdef KDTRACE_HOOKS
+ if (error) {
+ KDTRACE_NFS_ACCESSCACHE_LOAD_DONE(vp, cred->cr_uid, 0,
+ error);
+ }
+#endif
return (error);
}
OpenPOWER on IntegriCloud