aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2006-09-29 04:58:36 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 12:18:03 -0400
commit910067d188d56d80801b71b0ca1f73aa400c7b8c (patch)
tree5176ec3f62544cb4d8c3ff33c00d75c877856a17
parente04da1dfd9041e306cb33d1b40b6005c23c5b325 (diff)
[PATCH] remove generic__raw_read_trylock()
If the cpu has the lock held for write, is interrupted, and the interrupt handler calls read_trylock(), it's an instant deadlock. Now, Dave Miller has subsequently pointed out that we don't have any situations where this can occur. Nevertheless, we should delete generic__raw_read_lock (and its associated EXPORT to make Arjan happy) so that nobody thinks they can use it. Acked-by: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--kernel/spinlock.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/kernel/spinlock.c b/kernel/spinlock.c
index 9644a41e0bef..d48143eafbfd 100644
--- a/kernel/spinlock.c
+++ b/kernel/spinlock.c
@@ -21,17 +21,6 @@
21#include <linux/debug_locks.h> 21#include <linux/debug_locks.h>
22#include <linux/module.h> 22#include <linux/module.h>
23 23
24/*
25 * Generic declaration of the raw read_trylock() function,
26 * architectures are supposed to optimize this:
27 */
28int __lockfunc generic__raw_read_trylock(raw_rwlock_t *lock)
29{
30 __raw_read_lock(lock);
31 return 1;
32}
33EXPORT_SYMBOL(generic__raw_read_trylock);
34
35int __lockfunc _spin_trylock(spinlock_t *lock) 24int __lockfunc _spin_trylock(spinlock_t *lock)
36{ 25{
37 preempt_disable(); 26 preempt_disable();