From: pcaulfield@sourceware.org <pcaulfield@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/dlm-kernel/src device.c
Date: 5 Dec 2007 08:45:55 -0000 [thread overview]
Message-ID: <20071205084555.13966.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: STABLE
Changes by: pcaulfield at sourceware.org 2007-12-05 08:45:54
Modified files:
dlm-kernel/src : device.c
Log message:
Fix for bz#280161
Killing a userland process can leave locks hanging around
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm-kernel/src/device.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.24.2.1.4.1.2.9&r2=1.24.2.1.4.1.2.10
--- cluster/dlm-kernel/src/Attic/device.c 2006/08/14 21:13:26 1.24.2.1.4.1.2.9
+++ cluster/dlm-kernel/src/Attic/device.c 2007/12/05 08:45:54 1.24.2.1.4.1.2.10
@@ -544,13 +544,19 @@
/* If it was waiting for a conversion, it will
now be granted so we can unlock it properly */
- if (lock_status == GDLM_LKSTS_CONVERT) {
- flags &= ~DLM_LKF_CANCEL;
- clear_bit(LI_FLAG_COMPLETE, &li.li_flags);
- status = dlm_unlock(f->fi_ls->ls_lockspace, lkb->lkb_id, flags, &li.li_lksb, &li);
-
- if (status == 0)
- wait_for_ast(&li);
+ if (lock_status == GDLM_LKSTS_CONVERT || status == -EBUSY) {
+ do {
+ flags &= ~DLM_LKF_CANCEL;
+ clear_bit(LI_FLAG_COMPLETE, &li.li_flags);
+ status = dlm_unlock(f->fi_ls->ls_lockspace, lkb->lkb_id, flags, &li.li_lksb, &li);
+
+ if (status == 0)
+ wait_for_ast(&li);
+
+ if (status == -EBUSY) {
+ msleep(1);
+ }
+ } while (status == -EBUSY);
}
}
next reply other threads:[~2007-12-05 8:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-05 8:45 pcaulfield [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-10-09 7:24 [Cluster-devel] cluster/dlm-kernel/src device.c pcaulfield
2007-10-05 10:06 pcaulfield
2007-09-26 13:53 pcaulfield
2007-09-12 8:40 pcaulfield
2006-08-14 21:13 teigland
2006-08-14 21:11 teigland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071205084555.13966.qmail@sourceware.org \
--to=pcaulfield@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).