cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Andreas Gruenbacher <agruenba@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] dlm_controld: remove old build workaround
Date: Wed,  3 May 2023 13:38:28 +0200	[thread overview]
Message-ID: <20230503113828.66573-1-agruenba@redhat.com> (raw)

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@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


                 reply	other threads:[~2023-05-03 11:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230503113828.66573-1-agruenba@redhat.com \
    --to=agruenba@redhat.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).