diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-10-02 16:57:46 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2018-10-05 09:32:37 -0400 |
commit | 21924765862a0871908a35cb0e53e2e1c169b888 (patch) | |
tree | a0a212a1bda8125bb93bfb9fe33bacf2349018bf | |
parent | c7944ebb9ce9461079659e9e6ec5baaf73724b3b (diff) |
SUNRPC: use cmpxchg64() in gss_seq_send64_fetch_and_inc()
The newly introduced gss_seq_send64_fetch_and_inc() fails to build on
32-bit architectures:
net/sunrpc/auth_gss/gss_krb5_seal.c:144:14: note: in expansion of macro 'cmpxchg'
seq_send = cmpxchg(&ctx->seq_send64, old, old + 1);
^~~~~~~
arch/x86/include/asm/cmpxchg.h:128:3: error: call to '__cmpxchg_wrong_size' declared with attribute error: Bad argument size for cmpxchg
__cmpxchg_wrong_size(); \
As the message tells us, cmpxchg() cannot be used on 64-bit arguments,
that's what cmpxchg64() does.
Fixes: 571ed1fd2390 ("SUNRPC: Replace krb5_seq_lock with a lockless scheme")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_seal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/auth_gss/gss_krb5_seal.c b/net/sunrpc/auth_gss/gss_krb5_seal.c index 0ffb797b92e5..54e41c01edb7 100644 --- a/net/sunrpc/auth_gss/gss_krb5_seal.c +++ b/net/sunrpc/auth_gss/gss_krb5_seal.c | |||
@@ -141,7 +141,7 @@ gss_seq_send64_fetch_and_inc(struct krb5_ctx *ctx) | |||
141 | 141 | ||
142 | do { | 142 | do { |
143 | old = seq_send; | 143 | old = seq_send; |
144 | seq_send = cmpxchg(&ctx->seq_send64, old, old + 1); | 144 | seq_send = cmpxchg64(&ctx->seq_send64, old, old + 1); |
145 | } while (old != seq_send); | 145 | } while (old != seq_send); |
146 | return seq_send; | 146 | return seq_send; |
147 | } | 147 | } |