OSDN Git Service

Pass mode to wait_on_atomic_t() action funcs and provide default actions
authorDavid Howells <dhowells@redhat.com>
Thu, 2 Nov 2017 15:27:44 +0000 (15:27 +0000)
committerDavid Howells <dhowells@redhat.com>
Mon, 13 Nov 2017 15:38:16 +0000 (15:38 +0000)
commit5e4def20381678ba3ce0a4e117f97e378ecd81bc
tree455d2c682d9430a06bf2eb91b12e7eba9b1a645e
parent81445e63e67a1e98b1c2575fa2b406d4289d2754
Pass mode to wait_on_atomic_t() action funcs and provide default actions

Make wait_on_atomic_t() pass the TASK_* mode onto its action function as an
extra argument and make it 'unsigned int throughout.

Also, consolidate a bunch of identical action functions into a default
function that can do the appropriate thing for the mode.

Also, change the argument name in the bit_wait*() function declarations to
reflect the fact that it's the mode and not the bit number.

[Peter Z gives this a grudging ACK, but thinks that the whole atomic_t wait
should be done differently, though he's not immediately sure as to how]

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
cc: Ingo Molnar <mingo@kernel.org>
14 files changed:
arch/mips/kernel/traps.c
drivers/gpu/drm/drm_dp_aux_dev.c
drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c
drivers/media/platform/qcom/venus/hfi.c
fs/afs/rxrpc.c
fs/btrfs/extent-tree.c
fs/fscache/cookie.c
fs/fscache/internal.h
fs/fscache/main.c
fs/nfs/inode.c
fs/nfs/internal.h
fs/ocfs2/filecheck.c
include/linux/wait_bit.h
kernel/sched/wait_bit.c