From: Asad Saeed Date: Mon, 13 Aug 2012 20:21:10 +0000 (-0700) Subject: sanlock: don't unlink lockspace if registration fails X-Git-Tag: v0.10.0-rc1~159 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff73c6d3bc60eb6557fedd12f14b8416c81fcda6;p=thirdparty%2Flibvirt.git sanlock: don't unlink lockspace if registration fails This is a patch for bug 847848 If registering an existing lockspace with the sanlock daemon returns an error, libvirt should not proceed to unlink the lockspace. Signed-off-by: Asad Saeed --- diff --git a/AUTHORS b/AUTHORS index 016bd15427..6b228ecbd7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -255,6 +255,7 @@ Patches have also been contributed by: Richa Marwaha Peter Feiner Frido Roose + Asad Saeed [....send patches to get your name here....] diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c index 9ec99dd7d4..f046102f6a 100644 --- a/src/locking/lock_driver_sanlock.c +++ b/src/locking/lock_driver_sanlock.c @@ -242,7 +242,7 @@ static int virLockManagerSanlockSetupLockspace(void) virReportSystemError(-rv, _("Unable to add lockspace %s"), path); - goto error_unlink; + goto error; } else { VIR_DEBUG("Lockspace %s is already registered", path); }