v_iocount and cache_lookup()
v_iocount and cache_lookup()
- Subject: v_iocount and cache_lookup()
- From: mogambo <email@hidden>
- Date: Wed, 27 Apr 2011 11:45:29 -0700
Hi,
I am hitting a panic with my network file system driver that indicates that there were too many vnode_put()s on a vnode. The panic string is:
panic(cpu 4 caller 0xffffff8000237ddd): "vnode_put(0xffffff80247e60f8): iocount < 1"@/SourceCache/xnu/xnu-1504.9.26/bsd/vfs/vfs_subr.c:3786
I am looking at all vnode_get()s and vnode_put()s in my code and I have come across a piece of code that seems to assume that cache_lookup() returns with a v_iocount taken. I looked at cache_lookup() and I did not see any implicit vnode_get() or vnode_getiocount() when there's a positive match. What confused me more is the following comment from hfs code (hfs_vnop_lookup(): xnu-1504.7.4/bsd/hfs/hfs_lookup.c:452):
* We have a name that matched
* cache_lookup returns the vp with an iocount reference already taken
*/
I am reading this as cache_lookup() returns with an extra vnode_get(). Am I misunderstanding this missing something in cache_lookup()?
Thanks for your attention,
-m.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden