mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 21:53:44 +00:00
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
This commit is contained in:
parent
5f9e832c13
commit
f9adc23ee9
@ -118,26 +118,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
|
|||||||
static inline int
|
static inline int
|
||||||
arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr)
|
arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr)
|
||||||
{
|
{
|
||||||
int oldval = 0, ret;
|
return -ENOSYS;
|
||||||
|
|
||||||
pagefault_disable();
|
|
||||||
|
|
||||||
switch (op) {
|
|
||||||
case FUTEX_OP_SET:
|
|
||||||
case FUTEX_OP_ADD:
|
|
||||||
case FUTEX_OP_OR:
|
|
||||||
case FUTEX_OP_ANDN:
|
|
||||||
case FUTEX_OP_XOR:
|
|
||||||
default:
|
|
||||||
ret = -ENOSYS;
|
|
||||||
}
|
|
||||||
|
|
||||||
pagefault_enable();
|
|
||||||
|
|
||||||
if (!ret)
|
|
||||||
*oval = oldval;
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
Loading…
Reference in New Issue
Block a user