Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

locking/rwsem: Remove an unused parameter of rwsem_wake()

The 2nd parameter 'count' is not used in this function.
The places where the function is called are also modified.

Signed-off-by: xuyehan <xuyehan@xiaomi.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Waiman Long <longman@redhat.com>
Link: https://lore.kernel.org/r/1625547043-28103-1-git-send-email-yehanxu1@gmail.com

authored by

xuyehan and committed by
Peter Zijlstra
d4e5076c d1bbfd0c

+3 -3
+3 -3
kernel/locking/rwsem.c
··· 1165 1165 * handle waking up a waiter on the semaphore 1166 1166 * - up_read/up_write has decremented the active part of count if we come here 1167 1167 */ 1168 - static struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem, long count) 1168 + static struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem) 1169 1169 { 1170 1170 unsigned long flags; 1171 1171 DEFINE_WAKE_Q(wake_q); ··· 1297 1297 if (unlikely((tmp & (RWSEM_LOCK_MASK|RWSEM_FLAG_WAITERS)) == 1298 1298 RWSEM_FLAG_WAITERS)) { 1299 1299 clear_nonspinnable(sem); 1300 - rwsem_wake(sem, tmp); 1300 + rwsem_wake(sem); 1301 1301 } 1302 1302 } 1303 1303 ··· 1319 1319 rwsem_clear_owner(sem); 1320 1320 tmp = atomic_long_fetch_add_release(-RWSEM_WRITER_LOCKED, &sem->count); 1321 1321 if (unlikely(tmp & RWSEM_FLAG_WAITERS)) 1322 - rwsem_wake(sem, tmp); 1322 + rwsem_wake(sem); 1323 1323 } 1324 1324 1325 1325 /*