|
@@ -153,7 +153,7 @@ __rwsem_mark_wake(struct rw_semaphore *sem,
|
|
if (wake_type != RWSEM_WAKE_READ_OWNED) {
|
|
if (wake_type != RWSEM_WAKE_READ_OWNED) {
|
|
adjustment = RWSEM_ACTIVE_READ_BIAS;
|
|
adjustment = RWSEM_ACTIVE_READ_BIAS;
|
|
try_reader_grant:
|
|
try_reader_grant:
|
|
- oldcount = atomic_long_add_return(adjustment, &sem->count) - adjustment;
|
|
|
|
|
|
+ oldcount = atomic_long_fetch_add(adjustment, &sem->count);
|
|
|
|
|
|
if (unlikely(oldcount < RWSEM_WAITING_BIAS)) {
|
|
if (unlikely(oldcount < RWSEM_WAITING_BIAS)) {
|
|
/*
|
|
/*
|