History

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.

xuyehan committed 5 years ago

Commit d4e50761 parent d1bbfd01 file · +3 −3Browse files

Unified · Split

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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t