[Cluster-devel] [PATCH] dlm_controld: remove old build workaround

Andreas Gruenbacher agruenba at redhat.com
Wed May 3 11:38:28 UTC 2023


Remove the old build workaround from 2011, when DLM_PLOCK_FL_CLOSE
wasn't always defined in <linux/dlm_plock.h>.

Signed-off-by: Andreas Gruenbacher <agruenba at redhat.com>
---
 dlm_controld/plock.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/dlm_controld/plock.c b/dlm_controld/plock.c
index 7f632888..a91aecb0 100644
--- a/dlm_controld/plock.c
+++ b/dlm_controld/plock.c
@@ -9,15 +9,6 @@
 #include "dlm_daemon.h"
 #include <linux/dlm_plock.h>
 
-/* 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
-#define DLM_PLOCK_BUILD_WORKAROUND 1
-#endif
-
 static uint32_t plock_read_count;
 static uint32_t plock_recv_count;
 static uint32_t plock_rate_delays;
@@ -757,11 +748,7 @@ static void do_unlock(struct lockspace *ls, struct dlm_plock_info *in,
 
 	rv = unlock_internal(ls, r, in);
 
-#ifdef DLM_PLOCK_BUILD_WORKAROUND
-	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;
@@ -1595,13 +1582,8 @@ void process_plocks(int ci)
 	return;
 
  fail:
-#ifdef DLM_PLOCK_BUILD_WORKAROUND
-	if (!(info.pad & DLM_PLOCK_FL_CLOSE)) {
-#else
-	if (!(info.flags & DLM_PLOCK_FL_CLOSE)) {
-#endif
+	if (!(info.flags & DLM_PLOCK_FL_CLOSE))
 		write_result(&info, rv);
-	}
 }
 
 void process_saved_plocks(struct lockspace *ls)
-- 
2.40.0



More information about the Cluster-devel mailing list