提交 e0b401e3 编写于 作者: H Huaisheng Ye 提交者: 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: NHuaisheng Ye <yehs1@lenovo.com>
Reviewed-by: NRoss Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: NDave Jiang <dave.jiang@intel.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册