Skip to contentSkip to conversation

dlm_controld: remove old build workaround

PATCH New Andreas Gruenbacher 1 participant 1 message May 3, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dlm_controld: remove old build workaround

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

---
 dlm_controld/plock.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)
dlm_controld/plock.c +1 -19
index 7f632888..a91aecb0 100644
@@ -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)
Signature · 1 line
2.40.0