diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2020-12-03 14:11:13 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-01-09 13:44:55 +0100 |
commit | d390fc97df62dd76770eeab53f78e8ce2a07113d (patch) | |
tree | 71289f2ba8a2fe91f05891ff513a917054c436df /include/linux/rwsem.h | |
parent | 1b75a263fbd95f7e03af23921eb3f32086db66f1 (diff) |
rwsem: Implement down_read_interruptible
[ Upstream commit 31784cff7ee073b34d6eddabb95e3be2880a425c ]
In preparation for converting exec_update_mutex to a rwsem so that
multiple readers can execute in parallel and not deadlock, add
down_read_interruptible. This is needed for perf_event_open to be
converted (with no semantic changes) from working on a mutex to
wroking on a rwsem.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/87k0tybqfy.fsf@x220.int.ebiederm.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux/rwsem.h')
-rw-r--r-- | include/linux/rwsem.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index c91ac00d1ff8..8a3606372abc 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h @@ -125,6 +125,7 @@ static inline int rwsem_is_contended(struct rw_semaphore *sem) * lock for reading */ extern void down_read(struct rw_semaphore *sem); +extern int __must_check down_read_interruptible(struct rw_semaphore *sem); extern int __must_check down_read_killable(struct rw_semaphore *sem); /* |