From 33eff6597facc01bbcd5266fb83c8a6bfa40dfa8 Mon Sep 17 00:00:00 2001 From: Mark Vitale Date: Tue, 8 May 2012 15:03:46 -0400 Subject: [PATCH 1/1] vos: volume lock not released on convertROtoRW error If an error occurs during convertROtoRW, the volume lock may not be released. Change-Id: Ic03af00676de836cade4e39a743b234a0dc9b6cf Reviewed-on: http://gerrit.openafs.org/7389 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear --- src/volser/vos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/volser/vos.c b/src/volser/vos.c index fbd32a7..fb8a638 100644 --- a/src/volser/vos.c +++ b/src/volser/vos.c @@ -5626,7 +5626,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; @@ -5661,6 +5661,7 @@ ConvertRO(struct cmd_syndesc *as, void *arock) code); } + error_exit: vcode = UV_LockRelease(entry.volumeId[RWVOL]); if (vcode) { fprintf(STDERR, -- 1.9.4