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 <asad.saeed@acidseed.com>
This commit is contained in:
Asad Saeed 2012-08-13 13:21:10 -07:00 committed by Eric Blake
parent 86157b594f
commit ff73c6d3bc
2 changed files with 2 additions and 1 deletions

View File

@ -255,6 +255,7 @@ Patches have also been contributed by:
Richa Marwaha <rmarwah@linux.vnet.ibm.com>
Peter Feiner <peter@gridcentric.ca>
Frido Roose <frido.roose@gmail.com>
Asad Saeed <asad.saeed@acidseed.com>
[....send patches to get your name here....]

View File

@ -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);
}