Commit fa59b0b0 authored by Waiman Long's avatar Waiman Long Committed by openeuler-sync-bot
Browse files

locking/rwsem: Pass the current atomic count to rwsem_down_read_slowpath()

mainline inclusion
from mainline-v5.11-rc1
commit c8fe8b05
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7A0N9
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c8fe8b0564388f41147326f31e4587171aacccd4



--------------------------------

The atomic count value right after reader count increment can be useful
to determine the rwsem state at trylock time. So the count value is
passed down to rwsem_down_read_slowpath() to be used when appropriate.

Signed-off-by: default avatarWaiman Long <longman@redhat.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarDavidlohr Bueso <dbueso@suse.de>
Link: https://lkml.kernel.org/r/20201121041416.12285-2-longman@redhat.com


Conflicts:
  kernel/locking/rwsem.c
[yyl: No functional changed.]
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
(cherry picked from commit 6f54c87c)
parent 70e33bec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment