linux/drivers
Dan Williams 70aab281e1 dax: Introduce alloc_dev_dax_id()
The reference counting of dax_region objects is needlessly complicated,
has lead to confusion [1], and has hidden a bug [2]. Towards cleaning up
that mess introduce alloc_dev_dax_id() to minimize the holding of a
dax_region reference to only what dev_dax_release() needs, the
dax_region->ida.

Part of the reason for the mess was the design to dereference a
dax_region in all cases in free_dev_dax_id() even if the id was
statically assigned by the upper level dax_region driver. Remove the
need to call "is_static(dax_region)" by tracking whether the id is
dynamic directly in the dev_dax instance itself.

With that flag the dax_region pinning and release per dev_dax instance
can move to alloc_dev_dax_id() and free_dev_dax_id() respectively.

A follow-on cleanup address the unnecessary references in the dax_region
setup and drivers.

Fixes: 0f3da14a4f ("device-dax: introduce 'seed' devices")
Link: http://lore.kernel.org/r/20221203095858.612027-1-liuyongqiang13@huawei.com [1]
Link: http://lore.kernel.org/r/3cf0890b-4eb0-e70e-cd9c-2ecc3d496263@hpe.com [2]
Reported-by: Yongqiang Liu <liuyongqiang13@huawei.com>
Reported-by: Paul Cassella <cassella@hpe.com>
Reported-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Link: https://lore.kernel.org/r/168577284563.1672036.13493034988900989554.stgit@dwillia2-xfh.jf.intel.com
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
2023-06-23 01:03:50 -06:00
..
accel
accessibility
acpi ACPI: video: Remove acpi_backlight=video quirk for Lenovo ThinkPad W530 2023-05-04 20:23:41 +02:00
amba
android
ata
atm
auxdisplay
base
bcma
block ublk: fix command op code check 2023-05-12 09:09:06 -06:00
bluetooth
bus
cdrom
cdx
char
clk A couple more patches that would be good to get into -rc1. 2023-05-07 10:31:45 -07:00
clocksource
comedi
connector
counter
cpufreq
cpuidle
crypto This push fixes the following problems: 2023-05-07 10:57:14 -07:00
cxl cxl: Move cxl_await_media_ready() to before capacity info retrieval 2023-05-18 16:43:45 -07:00
dax dax: Introduce alloc_dev_dax_id() 2023-06-23 01:03:50 -06:00
dca
devfreq
dio
dma dmaengine updates for v6.4 2023-05-03 11:11:56 -07:00
dma-buf
edac
eisa
extcon
firewire firewire: net: fix unexpected release of object for asynchronous request packet 2023-05-11 09:06:49 +09:00
firmware Merge tag 'drm-misc-fixes-2023-05-11' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes 2023-05-12 05:32:36 +10:00
fpga
fsi
gnss
gpio hte: Changes for v6.4-rc1 2023-05-03 11:00:27 -07:00
gpu Merge tag 'amd-drm-fixes-6.4-2023-05-11' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes 2023-05-12 06:46:34 +10:00
greybus
hid
hsi
hte
hv
hwmon hwmon: (k10temp) Add PCI ID for family 19, model 78h 2023-05-08 11:36:19 +02:00
hwspinlock
hwtracing
i2c i2c: gxp: fix build failure without CONFIG_I2C_SLAVE 2023-05-03 17:27:29 +02:00
i3c
idle
iio
infiniband
input
interconnect
iommu
ipack
irqchip
isdn Including fixes from netfilter. 2023-05-05 19:12:01 -07:00
leds
macintosh
mailbox - mailbox api: allow direct registration to a channel 2023-05-07 10:17:33 -07:00
mcb
md for-6.4/block-2023-05-06 2023-05-06 08:28:58 -07:00
media media: nxp: imx8-isi: fix buiding on 32-bit 2023-05-08 09:10:07 -07:00
memory
memstick
message
mfd
misc
mmc
most
mtd This pull request contains updates for UBI and UBIFS 2023-05-03 18:58:59 -07:00
mux
net net: mscc: ocelot: fix stat counter register values 2023-05-10 12:11:18 +01:00
nfc
ntb
nubus
nvdimm libnvdimm: mark 'security_show' static again 2023-06-07 13:30:21 -07:00
nvme for-6.4/io_uring-2023-05-07 2023-05-07 10:00:09 -07:00
nvmem
of Devicetree fixes for 6.4, part 1: 2023-05-05 13:27:59 -07:00
opp
parisc parisc: Replace regular spinlock with spin_trylock on panic path 2023-05-03 17:43:26 +02:00
parport
pci
pcmcia
peci
perf
phy phy fixes for 6.4 2023-05-05 11:57:29 -07:00
pinctrl Pin control bulk changes for the v6.4 kernel: 2023-05-02 15:40:41 -07:00
platform platform/mellanox: fix potential race in mlxbf-tmfifo driver 2023-05-09 11:54:35 +02:00
pnp
power
powercap
pps
ps3
ptp
pwm pwm: Changes for v6.4-rc1 2023-05-03 11:25:01 -07:00
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi SCSI misc on 20230506 2023-05-06 08:37:28 -07:00
sh
siox
slimbus
soc
soundwire
spi
spmi
ssb
staging
target
tc
tee
thermal thermal: intel: powerclamp: Fix NULL pointer access issue 2023-05-04 20:30:18 +02:00
thunderbolt
tty
ufs scsi: ufs: core: Fix I/O hang that occurs when BKOPS fails in W-LUN suspend 2023-05-08 07:15:05 -04:00
uio
usb
vdpa
vfio
vhost
video fbdev: stifb: Fix info entry in sti_struct on error path 2023-05-12 11:50:33 +02:00
virt
virtio
vlynq
w1
watchdog linux-watchdog 6.4-rc1 tag 2023-05-04 18:33:56 -07:00
xen
zorro
Kconfig
Makefile