Skip to content

Commit d4e5076

Browse files
xuyehanPeter Zijlstra
authored andcommitted
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
1 parent d1bbfd0 commit d4e5076

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎kernel/locking/rwsem.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ rwsem_down_write_slowpath(struct rw_semaphore *sem, int state)
11651165
* handle waking up a waiter on the semaphore
11661166
* - up_read/up_write has decremented the active part of count if we come here
11671167
*/
1168-
static struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem, long count)
1168+
static struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem)
11691169
{
11701170
unsigned long flags;
11711171
DEFINE_WAKE_Q(wake_q);
@@ -1297,7 +1297,7 @@ static inline void __up_read(struct rw_semaphore *sem)
12971297
if (unlikely((tmp & (RWSEM_LOCK_MASK|RWSEM_FLAG_WAITERS)) ==
12981298
RWSEM_FLAG_WAITERS)) {
12991299
clear_nonspinnable(sem);
1300-
rwsem_wake(sem, tmp);
1300+
rwsem_wake(sem);
13011301
}
13021302
}
13031303

@@ -1319,7 +1319,7 @@ static inline void __up_write(struct rw_semaphore *sem)
13191319
rwsem_clear_owner(sem);
13201320
tmp = atomic_long_fetch_add_release(-RWSEM_WRITER_LOCKED, &sem->count);
13211321
if (unlikely(tmp & RWSEM_FLAG_WAITERS))
1322-
rwsem_wake(sem, tmp);
1322+
rwsem_wake(sem);
13231323
}
13241324

13251325
/*

0 commit comments

Comments
 (0)