From: Mark Vitale Date: Tue, 8 May 2012 19:03:46 +0000 (-0400) Subject: vos: volume lock not released on convertROtoRW error X-Git-Tag: upstream/1.6.2_pre2^2~169 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=321dda2d285243a45372a8a6eea59529698f15df;p=packages%2Fo%2Fopenafs.git vos: volume lock not released on convertROtoRW error If an error occurs during convertROtoRW, the volume lock may not be released. Reviewed-on: http://gerrit.openafs.org/7389 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 33eff6597facc01bbcd5266fb83c8a6bfa40dfa8) Change-Id: I0b87fd3b99f178d99f997032c14673def111c1de Reviewed-on: http://gerrit.openafs.org/7499 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/volser/vos.c b/src/volser/vos.c index f0c2176f1..d1991c7cf 100644 --- a/src/volser/vos.c +++ b/src/volser/vos.c @@ -5637,7 +5637,7 @@ ConvertRO(struct cmd_syndesc *as, void *arock) "Converting RO volume %lu to RW volume failed with code %d\n", (unsigned long)volid, code); PrintError("convertROtoRW ", code); - return -1; + goto error_exit; } entry.serverFlags[roindex] = ITSRWVOL; entry.flags |= RW_EXISTS; @@ -5672,6 +5672,7 @@ ConvertRO(struct cmd_syndesc *as, void *arock) code); } + error_exit: vcode = UV_LockRelease(entry.volumeId[RWVOL]); if (vcode) { fprintf(STDERR,