diff --git a/src/volser/vos.c b/src/volser/vos.c index 89dbe9e446..fbd32a7e60 100644 --- a/src/volser/vos.c +++ b/src/volser/vos.c @@ -5612,6 +5612,13 @@ ConvertRO(struct cmd_syndesc *as, void *arock) vcode = ubik_VL_SetLock(cstruct, 0, entry.volumeId[RWVOL], RWVOL, VLOP_MOVE); + if (vcode) { + fprintf(STDERR, + "Unable to lock volume %lu, code %d\n", + (unsigned long)entry.volumeId[RWVOL],vcode); + PrintError("", vcode); + return -1; + } aconn = UV_Bind(server, AFSCONF_VOLUMEPORT); code = AFSVolConvertROtoRWvolume(aconn, partition, volid); if (code) { @@ -5653,9 +5660,13 @@ ConvertRO(struct cmd_syndesc *as, void *arock) "Warning: volume converted, but vldb update failed with code %d!\n", code); } + vcode = UV_LockRelease(entry.volumeId[RWVOL]); if (vcode) { - PrintDiagnostics("unlock", vcode); + fprintf(STDERR, + "Unable to unlock volume %lu, code %d\n", + (unsigned long)entry.volumeId[RWVOL],vcode); + PrintError("", vcode); } return code; }