Blob Blame History Raw
From: NeilBrown <neilb@suse.com>
Subject: [PATCH] kabi fix for NFSv4.1: Don't rebind to the same source port when reconnecting to the server
Patch-mainline: never, kabi
References: bnc#1186264

The patch mentioned in subject adds a bit-field to 'struct rpc_xprt'.
This will use otherwise unused space in the struct, so it doesn't
actually change the size or offset of anything.
So it does not break the kabi in practice.

So hide the field from kabi checker.

Signed-off-by: NeilBrown <neilb@suse.de>

---
 include/linux/sunrpc/xprt.h |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -199,8 +199,16 @@ struct rpc_xprt {
 	unsigned int		min_reqs;	/* min number of slots */
 	unsigned int		num_reqs;	/* total slots */
 	unsigned long		state;		/* transport state */
+#ifndef __GENKSYMS__
 	unsigned char		resvport   : 1,	/* use a reserved port */
 				reuseport  : 1; /* reuse port on reconnect */
+#else
+/* For kabi checks, hide reuseport which will be placed in an unused bit,
+ * and #define it to resvport so that code can build.
+ */
+	unsigned char		resvport   : 1;	/* use a reserved port */
+#define reuseport resvport
+#endif
 	atomic_t		swapper;	/* we're swapping over this
 						   transport */
 	unsigned int		bind_index;	/* bind function index */