percpu-rwsem: introduce percpu_rwsem_release() and percpu_rwsem_acquire()
authorOleg Nesterov <oleg@redhat.com>
Tue, 21 Jul 2015 18:26:44 +0000 (20:26 +0200)
committerOleg Nesterov <oleg@redhat.com>
Sat, 15 Aug 2015 11:52:10 +0000 (13:52 +0200)
commit55cc156505f2e43fa45dbd4bfe8f9c9d848ca44c
tree18e5e34c2621de27c4833d834e05213c46587478
parent9287f6925ad9d8fb8c6283066b4f77fd87f123a9
percpu-rwsem: introduce percpu_rwsem_release() and percpu_rwsem_acquire()

Add percpu_rwsem_release() and percpu_rwsem_acquire() for the users
which need to return to userspace with percpu-rwsem lock held and/or
pass the ownership to another thread.

TODO: change percpu_rwsem_release() to use rwsem_clear_owner(). We can
either fold kernel/locking/rwsem.h into include/linux/rwsem.h, or add
the non-inline percpu_rwsem_clear_owner().

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
include/linux/percpu-rwsem.h