dlm: master - dlm_controld: skip unlink with no ckpt

David Teigland teigland@fedoraproject.org
Fri Mar 27 16:34:00 GMT 2009


Gitweb:        http://git.fedorahosted.org/git/dlm.git?p=dlm.git;a=commitdiff;h=d412e873107000491b0a2c77bb4f6b52b523772c
Commit:        d412e873107000491b0a2c77bb4f6b52b523772c
Parent:        a8ae02cdcf60b662f6eb941797d0aa8654b9a8b8
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Fri Mar 27 11:29:14 2009 -0500
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Fri Mar 27 11:29:53 2009 -0500

dlm_controld: skip unlink with no ckpt

Check if there's no previous checkpoint to unlink instead of trying
to unlink with a handle of 0, triggering an error message.

Signed-off-by: David Teigland <teigland@redhat.com>
---
 group/dlm_controld/plock.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/group/dlm_controld/plock.c b/group/dlm_controld/plock.c
index 885efa3..957d749 100644
--- a/group/dlm_controld/plock.c
+++ b/group/dlm_controld/plock.c
@@ -1668,6 +1668,9 @@ static int _unlink_checkpoint(struct lockspace *ls, SaNameT *name)
 	h = (SaCkptCheckpointHandleT) ls->plock_ckpt_handle;
 	log_group(ls, "unlink ckpt %llx", (unsigned long long)h);
 
+	if (!h)
+		return;
+
  unlink_retry:
 	rv = saCkptCheckpointUnlink(system_ckpt_handle, name);
 	if (rv == SA_AIS_ERR_TRY_AGAIN) {



More information about the Cluster-cvs mailing list