DAFS: Do not let VScheduleSalvage_r free vp
authorAndrew Deason <adeason@sinenomine.net>
Fri, 5 Nov 2010 19:34:05 +0000 (14:34 -0500)
committerDerrick Brashear <shadow@dementia.org>
Fri, 5 Nov 2010 20:11:23 +0000 (13:11 -0700)
commitef4b9e13ef6a79d7e5f540297e486189fdedf085
tree9d0221004e0e3c878af4a4377097708c5c7923a1
parenta8d1fe61f4a0d906d4086b71c88b0a3ab278b12c
DAFS: Do not let VScheduleSalvage_r free vp

In VScheduleSalvage_r, we were calling VCancelReservation_r, which has
the possibility of free'ing vp. Since we still use vp after doing this
(and since we're already inside VCancelReservation_r to begin with),
we must not free vp. Instead, just decrement nWaiters without
triggering any of the dtor code in VCancelReservation_r. This is safe
as long as all VScheduleSalvage_r callers ensure that they check to
free the vp if necessary, which they all do.

Thanks to Derrick Brashear.

Change-Id: Iebdbdf47c6307cd7c036b88ad4dbc25bc7a3279a
Reviewed-on: http://gerrit.openafs.org/3272
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/vol/volume.c