From c2a089e754854e2dcf9283a7a1a02d4505636679 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Wed, 9 Jan 2008 10:30:45 -0600 Subject: [PATCH] --- yaml --- r: 80614 b: refs/heads/master c: 42dc1601a9a31e8da767a4a9c37bad844b3698ab h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/dlm/lock.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 6718943324da..7d93c37b2073 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c54e04b00fe027da30ada5af76b6749772dd644a +refs/heads/master: 42dc1601a9a31e8da767a4a9c37bad844b3698ab diff --git a/trunk/fs/dlm/lock.c b/trunk/fs/dlm/lock.c index c2890efb0259..fa68e9b93651 100644 --- a/trunk/fs/dlm/lock.c +++ b/trunk/fs/dlm/lock.c @@ -2110,17 +2110,18 @@ static int validate_unlock_args(struct dlm_lkb *lkb, struct dlm_args *args) /* an lkb may be waiting for an rsb lookup to complete where the lookup was initiated by another lock */ - if (args->flags & (DLM_LKF_CANCEL | DLM_LKF_FORCEUNLOCK)) { - if (!list_empty(&lkb->lkb_rsb_lookup)) { + if (!list_empty(&lkb->lkb_rsb_lookup)) { + if (args->flags & (DLM_LKF_CANCEL | DLM_LKF_FORCEUNLOCK)) { log_debug(ls, "unlock on rsb_lookup %x", lkb->lkb_id); list_del_init(&lkb->lkb_rsb_lookup); queue_cast(lkb->lkb_resource, lkb, args->flags & DLM_LKF_CANCEL ? -DLM_ECANCEL : -DLM_EUNLOCK); unhold_lkb(lkb); /* undoes create_lkb() */ - rv = -EBUSY; - goto out; } + /* caller changes -EBUSY to 0 for CANCEL and FORCEUNLOCK */ + rv = -EBUSY; + goto out; } /* cancel not allowed with another cancel/unlock in progress */