Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);