Skip to content

Commit f9adc23

Browse files
vaverinKAGA-KOKO
authored andcommitted
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
1 parent 5f9e832 commit f9adc23

1 file changed

Lines changed: 1 addition & 20 deletions

File tree

‎include/asm-generic/futex.h‎

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -118,26 +118,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
118118
static inline int
119119
arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr)
120120
{
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;
141122
}
142123

143124
static inline int

0 commit comments

Comments
 (0)