From ff73c6d3bc60eb6557fedd12f14b8416c81fcda6 Mon Sep 17 00:00:00 2001 From: Asad Saeed Date: Mon, 13 Aug 2012 13:21:10 -0700 Subject: [PATCH] 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 --- AUTHORS | 1 + src/locking/lock_driver_sanlock.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.47.2