summaryrefslogtreecommitdiff
path: root/kernel/futex/waitwake.c
diff options
context:
space:
mode:
authorpeterz@infradead.org <peterz@infradead.org>2023-09-21 13:45:08 +0300
committerPeter Zijlstra <peterz@infradead.org>2023-09-21 20:22:05 +0300
commit5694289ce183bc3336407a78c8c722a0b9208f9b (patch)
tree120c032a905fab3131cd305ce290f01c342cdb85 /kernel/futex/waitwake.c
parentd6d08d24790e82c69a46ef78ae44fe1b1ed30775 (diff)
downloadlinux-5694289ce183bc3336407a78c8c722a0b9208f9b.tar.xz
futex: Flag conversion
Futex has 3 sets of flags: - legacy futex op bits - futex2 flags - internal flags Add a few helpers to convert from the API flags into the internal flags. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: André Almeida <andrealmeid@igalia.com> Link: https://lore.kernel.org/r/20230921105247.722140574@noisy.programming.kicks-ass.net
Diffstat (limited to 'kernel/futex/waitwake.c')
-rw-r--r--kernel/futex/waitwake.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/futex/waitwake.c b/kernel/futex/waitwake.c
index ba01b9408203..fa9757766103 100644
--- a/kernel/futex/waitwake.c
+++ b/kernel/futex/waitwake.c
@@ -419,11 +419,11 @@ static int futex_wait_multiple_setup(struct futex_vector *vs, int count, int *wo
*/
retry:
for (i = 0; i < count; i++) {
- if ((vs[i].w.flags & FUTEX_PRIVATE_FLAG) && retry)
+ if (!(vs[i].w.flags & FLAGS_SHARED) && retry)
continue;
ret = get_futex_key(u64_to_user_ptr(vs[i].w.uaddr),
- !(vs[i].w.flags & FUTEX_PRIVATE_FLAG),
+ vs[i].w.flags & FLAGS_SHARED,
&vs[i].q.key, FUTEX_READ);
if (unlikely(ret))