From: Andrew Deason Date: Mon, 9 Apr 2012 22:16:42 +0000 (-0500) Subject: vos: Do not try to remove backup volume id 0 X-Git-Tag: upstream/1.8.0_pre1^2~2562 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=46bdb318c45b4e93a5b297e6fdee2b2acbed4b55;p=packages%2Fo%2Fopenafs.git vos: Do not try to remove backup volume id 0 Currently we always try to delete a BK volume if we're deleting the RW. If the BK volume id is 0, this is never going to do anything, so don't try to delete it. Change-Id: I0c003040cface9999944d61637077fce1736445e Reviewed-on: http://gerrit.openafs.org/7140 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/volser/vsprocs.c b/src/volser/vsprocs.c index 8bb600eb7..801489cb1 100644 --- a/src/volser/vsprocs.c +++ b/src/volser/vsprocs.c @@ -995,12 +995,14 @@ UV_DeleteVolume(afs_uint32 aserver, afs_int32 apart, afs_uint32 avolid) ERROR_EXIT(0); } - /* Delete backup if it exists */ - code = DoVolDelete(aconn, entry.volumeId[BACKVOL], apart, - "the backup", 0, NULL, NULL); - if (code && code != VNOVOL) { - error = code; - goto error_exit; + if (entry.volumeId[BACKVOL]) { + /* Delete backup if it exists */ + code = DoVolDelete(aconn, entry.volumeId[BACKVOL], apart, + "the backup", 0, NULL, NULL); + if (code && code != VNOVOL) { + error = code; + goto error_exit; + } } if (verbose)