Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: ef1c1dd818cf38d27455ce0e4678d55ae5c499eb
Parent: f0b85f3680510b03058a1e6e94fc11ad913ff59b
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Mon Jun 20 17:34:43 2011 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Mon Jun 20 17:35:59 2011 +0200
dlm_controld: fix build with old (< 3.0) kernel headers
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
group/dlm_controld/plock.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/group/dlm_controld/plock.c b/group/dlm_controld/plock.c
index f596d2f..166f6c9 100644
--- a/group/dlm_controld/plock.c
+++ b/group/dlm_controld/plock.c
@@ -3,10 +3,6 @@
#include <linux/dlm_plock.h>
-/* FIXME: remove this once everyone is using the version of
- * dlm_plock.h which defines it */
-#define DLM_PLOCK_FL_CLOSE 1
-
static uint32_t plock_read_count;
static uint32_t plock_recv_count;
static uint32_t plock_rate_delays;
@@ -741,7 +737,16 @@ static void do_unlock(struct lockspace *ls, struct dlm_plock_info
*in,
rv = unlock_internal(ls, r, in);
+/* FIXME: remove this once everyone is using the version of
+ * dlm_plock.h which defines it */
+
+#ifndef DLM_PLOCK_FL_CLOSE
+#warning DLM_PLOCK_FL_CLOSE undefined. Enabling build workaround.
+#define DLM_PLOCK_FL_CLOSE 1
+ if (in->pad & DLM_PLOCK_FL_CLOSE) {
+#else
if (in->flags & DLM_PLOCK_FL_CLOSE) {
+#endif
clear_waiters(ls, r, in);
/* no replies for unlock-close ops */
goto skip_result;