* [merged mm-stable] dax-busc-use-the-right-locking-mode-read-vs-write-in-size_show.patch removed from -mm tree
@ 2024-05-06 0:59 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-05-06 0:59 UTC (permalink / raw)
To: mm-commits, dave.jiang, dan.j.williams, alison.schofield,
vishal.l.verma, akpm
The quilt patch titled
Subject: dax/bus.c: use the right locking mode (read vs write) in size_show
has been removed from the -mm tree. Its filename was
dax-busc-use-the-right-locking-mode-read-vs-write-in-size_show.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Vishal Verma <vishal.l.verma@intel.com>
Subject: dax/bus.c: use the right locking mode (read vs write) in size_show
Date: Tue, 30 Apr 2024 11:44:26 -0600
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: c05ae9d85b47 ("dax/bus.c: replace driver-core lock usage by a local rwsem")
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Cc: Alison Schofield <alison.schofield@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/dax/bus.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/dax/bus.c~dax-busc-use-the-right-locking-mode-read-vs-write-in-size_show
+++ a/drivers/dax/bus.c
@@ -937,11 +937,11 @@ static ssize_t size_show(struct device *
unsigned long long size;
int rc;
- rc = down_write_killable(&dax_dev_rwsem);
+ rc = down_read_interruptible(&dax_dev_rwsem);
if (rc)
return rc;
size = dev_dax_size(dev_dax);
- up_write(&dax_dev_rwsem);
+ up_read(&dax_dev_rwsem);
return sysfs_emit(buf, "%llu\n", size);
}
_
Patches currently in -mm which might be from vishal.l.verma@intel.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-06 0:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-06 0:59 [merged mm-stable] dax-busc-use-the-right-locking-mode-read-vs-write-in-size_show.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.