aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/rwsem.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/rwsem.c b/lib/rwsem.c
index 61f91ca75e40..cf0ad2ad19f5 100644
--- a/lib/rwsem.c
+++ b/lib/rwsem.c
@@ -64,7 +64,7 @@ __rwsem_do_wake(struct rw_semaphore *sem, enum rwsem_wake_type wake_type)
64 struct rwsem_waiter *waiter; 64 struct rwsem_waiter *waiter;
65 struct task_struct *tsk; 65 struct task_struct *tsk;
66 struct list_head *next; 66 struct list_head *next;
67 signed long oldcount, woken, loop, adjustment; 67 long oldcount, woken, loop, adjustment;
68 68
69 waiter = list_entry(sem->wait_list.next, struct rwsem_waiter, list); 69 waiter = list_entry(sem->wait_list.next, struct rwsem_waiter, list);
70 if (waiter->type == RWSEM_WAITING_FOR_WRITE) { 70 if (waiter->type == RWSEM_WAITING_FOR_WRITE) {
@@ -145,10 +145,9 @@ __rwsem_do_wake(struct rw_semaphore *sem, enum rwsem_wake_type wake_type)
145 */ 145 */
146struct rw_semaphore __sched *rwsem_down_read_failed(struct rw_semaphore *sem) 146struct rw_semaphore __sched *rwsem_down_read_failed(struct rw_semaphore *sem)
147{ 147{
148 signed long adjustment = -RWSEM_ACTIVE_READ_BIAS; 148 long count, adjustment = -RWSEM_ACTIVE_READ_BIAS;
149 struct rwsem_waiter waiter; 149 struct rwsem_waiter waiter;
150 struct task_struct *tsk = current; 150 struct task_struct *tsk = current;
151 signed long count;
152 151
153 /* set up my own style of waitqueue */ 152 /* set up my own style of waitqueue */
154 waiter.task = tsk; 153 waiter.task = tsk;
@@ -193,10 +192,9 @@ struct rw_semaphore __sched *rwsem_down_read_failed(struct rw_semaphore *sem)
193 */ 192 */
194struct rw_semaphore __sched *rwsem_down_write_failed(struct rw_semaphore *sem) 193struct rw_semaphore __sched *rwsem_down_write_failed(struct rw_semaphore *sem)
195{ 194{
196 signed long adjustment = -RWSEM_ACTIVE_WRITE_BIAS; 195 long count, adjustment = -RWSEM_ACTIVE_WRITE_BIAS;
197 struct rwsem_waiter waiter; 196 struct rwsem_waiter waiter;
198 struct task_struct *tsk = current; 197 struct task_struct *tsk = current;
199 signed long count;
200 198
201 /* set up my own style of waitqueue */ 199 /* set up my own style of waitqueue */
202 waiter.task = tsk; 200 waiter.task = tsk;