Commit 2acf0453 authored by Vishal Verma's avatar Vishal Verma Committed by Andrew Morton
Browse files

dax/bus.c: use the right locking mode (read vs write) in size_show

In size_show(), the dax_dev_rwsem only needs a read lock, but was
acquiring a write lock.  Change it to down_read_interruptible() so it
doesn't unnecessarily hold a write lock.

Link: https://lkml.kernel.org/r/20240430-vv-dax_abi_fixes-v3-4-e3dcd755774c@intel.com


Fixes: c05ae9d8 ("dax/bus.c: replace driver-core lock usage by a local rwsem")
Signed-off-by: default avatarVishal Verma <vishal.l.verma@intel.com>
Reviewed-by: default avatarDan Williams <dan.j.williams@intel.com>
Cc: Alison Schofield <alison.schofield@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent e39dbcfb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment