summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-writecache.c
diff options
context:
space:
mode:
authorHuaisheng Ye <yehs1@lenovo.com>2018-07-30 09:15:47 +0200
committerDave Jiang <dave.jiang@intel.com>2018-07-30 18:40:04 +0200
commitf742267ae91faf241d2892878208dffc586ffe06 (patch)
tree448302ecb3ae879da7cf7b2f84cc91c1dfb9a19c /drivers/md/dm-writecache.c
parentdax/super: Do not request a pointer kaddr when not required (diff)
downloadlinux-f742267ae91faf241d2892878208dffc586ffe06.tar.xz
linux-f742267ae91faf241d2892878208dffc586ffe06.zip
md/dm-writecache: Don't request pointer dummy_addr when not required
Function persistent_memory_claim doesn't need to get local pointer dummy_addr from direct_access. Using NULL instead of having to pass in a useless local pointer that caller then just throw away. Suggested-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Huaisheng Ye <yehs1@lenovo.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Acked-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'drivers/md/dm-writecache.c')
-rw-r--r--drivers/md/dm-writecache.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c
index 5961c7794ef3..1839236a0f81 100644
--- a/drivers/md/dm-writecache.c
+++ b/drivers/md/dm-writecache.c
@@ -267,9 +267,8 @@ static int persistent_memory_claim(struct dm_writecache *wc)
i = 0;
do {
long daa;
- void *dummy_addr;
daa = dax_direct_access(wc->ssd_dev->dax_dev, i, p - i,
- &dummy_addr, &pfn);
+ NULL, &pfn);
if (daa <= 0) {
r = daa ? daa : -EINVAL;
goto err3;