Commit e0b401e3 authored by Huaisheng Ye's avatar Huaisheng Ye Committed by Dave Jiang

dax/super: Do not request a pointer kaddr when not required

Function __bdev_dax_supported doesn't need to get local pointer kaddr
from direct_access. Using NULL instead of having to pass in a useless
local pointer that caller then just throw away.
Signed-off-by: default avatarHuaisheng Ye <yehs1@lenovo.com>
Reviewed-by: default avatarRoss Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
parent 45df5d3d
......@@ -88,7 +88,6 @@ bool __bdev_dax_supported(struct block_device *bdev, int blocksize)
bool dax_enabled = false;
pgoff_t pgoff;
int err, id;
void *kaddr;
pfn_t pfn;
long len;
char buf[BDEVNAME_SIZE];
......@@ -114,7 +113,7 @@ bool __bdev_dax_supported(struct block_device *bdev, int blocksize)
}
id = dax_read_lock();
len = dax_direct_access(dax_dev, pgoff, 1, &kaddr, &pfn);
len = dax_direct_access(dax_dev, pgoff, 1, NULL, &pfn);
dax_read_unlock(id);
put_dax(dax_dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment