aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-table.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-08-26 15:55:06 +0200
committerDan Williams <dan.j.williams@intel.com>2021-08-26 16:52:03 -0700
commit673a0658f6ac359131a881c0dcf1b91c2500ab9c (patch)
tree06b96da7f964db1e4d3f3c7462562fa7f055b281 /drivers/md/dm-table.c
parentdax: mark dax_get_by_host static (diff)
downloadlinux-dev-673a0658f6ac359131a881c0dcf1b91c2500ab9c.tar.xz
linux-dev-673a0658f6ac359131a881c0dcf1b91c2500ab9c.zip
dax: move the dax_read_lock() locking into dax_supported
Move the dax_read_lock/dax_read_unlock pair from the callers into dax_supported to make it a little easier to use. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Link: https://lore.kernel.org/r/20210826135510.6293-6-hch@lst.de Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r--drivers/md/dm-table.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 0543cdf89e92..b53acca37581 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -809,14 +809,9 @@ EXPORT_SYMBOL_GPL(dm_table_set_type);
int device_not_dax_capable(struct dm_target *ti, struct dm_dev *dev,
sector_t start, sector_t len, void *data)
{
- int blocksize = *(int *) data, id;
- bool rc;
+ int blocksize = *(int *) data;
- id = dax_read_lock();
- rc = !dax_supported(dev->dax_dev, dev->bdev, blocksize, start, len);
- dax_read_unlock(id);
-
- return rc;
+ return !dax_supported(dev->dax_dev, dev->bdev, blocksize, start, len);
}
/* Check devices support synchronous DAX */