vol: Check for blank vnode in VAllocVnode_r
authorAndrew Deason <adeason@sinenomine.net>
Fri, 25 Feb 2011 22:58:30 +0000 (16:58 -0600)
committerDerrick Brashear <shadow@dementia.org>
Fri, 4 Mar 2011 15:37:44 +0000 (07:37 -0800)
commit974e95302a312c03cd735c0fdaa67fb02d254e26
treee3d69658dfb599234c58a7d3a48263df55bead41
parentb41575d176c2d485d55aed8780bfab9db4b7587d
vol: Check for blank vnode in VAllocVnode_r

When we alloc a vnode in VAllocVnode_r, we look up that vnode in the
vnode cache, to see if a vnode struct already exists for it. If it
doesn't, we check the vnode index to ensure that the vnode actually is
not in use (among other things). However, we do not perform the same
check for a vnode already in the cache. Add this check, to make sure
that we don't allocate an already-used vnode number, even if the
bitmap is screwed up.

Change-Id: I63b3aa752d359a2ff8282b193e658d74d6b9719c
Reviewed-on: http://gerrit.openafs.org/4060
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/vol/vnode.c