Skip to content
Commit 69f457b1 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Bjorn Helgaas
Browse files

PCI/P2PDMA: Use percpu_ref_tryget_live_rcu() inside RCU critical section

Since pci_alloc_p2pmem() has already called rcu_read_lock(), we're in an
RCU read-side critical section and don't need to take the lock again.  Use
percpu_ref_tryget_live_rcu() instead of percpu_ref_tryget_live() to save a
few cycles.

[bhelgaas: commit log]
Link: https://lore.kernel.org/r/ab80164f4d5b32f9e6240aa4863c3a147ff9c89f.1635974126.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarKrzysztof Wilczyński <kw@linux.com>
Reviewed-by: default avatarLogan Gunthorpe <logang@deltatee.com>
parent 133bc542
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment