When a volume is VOL_STATE_DELETED, it effectively does not exist to
other programs over FSSYNC. So, do not prevent someone from issuing a
FSYNC_VOL_LEAVE_OFF for a VOL_STATE_DELETED volume.
Reviewed-on: http://gerrit.openafs.org/4119
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit
ddf5ae4f746f2b5e522e10cfcacb6225499e7956)
Change-Id: I840930e144260036e2c96d83134a79dee3c9d083
Reviewed-on: http://gerrit.openafs.org/4165
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
if (vcom->hdr->command == FSYNC_VOL_LEAVE_OFF) {
/* nothing much to do if we're leaving the volume offline */
#ifdef AFS_DEMAND_ATTACH_FS
- if (vp) {
+ if (vp && V_attachState(vp) != VOL_STATE_DELETED) {
if (FSYNC_partMatch(vcom, vp, 1)) {
if ((V_attachState(vp) == VOL_STATE_UNATTACHED) ||
(V_attachState(vp) == VOL_STATE_PREATTACHED)) {