Gitweb:
http://git.fedorahosted.org/git/dlm.git?p=dlm.git;a=commitdiff;h=13a81443...
Commit: 13a814433588ba0a9d8228dcb2e6c6dba6f3c861
Parent: 1e95a3d8c8fb8ef889b4e69fca9ac7d9c062517b
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:34:43 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 967f3c0..3848308 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;
@@ -789,7 +785,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;