Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

futex: Cleanup generic SMP variant of arch_futex_atomic_op_inuser()

The generic SMP variant of arch_futex_atomic_op_inuser() returns always
-ENOSYS so the switch case and surrounding code are pointless. Remove it
and just return -ENOSYS.

Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lkml.kernel.org/r/12bdaca8-99eb-e576-f842-5970ab1d6a92@virtuozzo.com

authored by

Vasily Averin and committed by
Thomas Gleixner
f9adc23e 5f9e832c

+1 -20
+1 -20
include/asm-generic/futex.h
··· 118 118 static inline int 119 119 arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr) 120 120 { 121 - int oldval = 0, ret; 122 - 123 - pagefault_disable(); 124 - 125 - switch (op) { 126 - case FUTEX_OP_SET: 127 - case FUTEX_OP_ADD: 128 - case FUTEX_OP_OR: 129 - case FUTEX_OP_ANDN: 130 - case FUTEX_OP_XOR: 131 - default: 132 - ret = -ENOSYS; 133 - } 134 - 135 - pagefault_enable(); 136 - 137 - if (!ret) 138 - *oval = oldval; 139 - 140 - return ret; 121 + return -ENOSYS; 141 122 } 142 123 143 124 static inline int