diff options
author | Huaisheng Ye <yehs1@lenovo.com> | 2018-07-30 03:15:46 -0400 |
---|---|---|
committer | Dave Jiang <dave.jiang@intel.com> | 2018-07-30 12:39:28 -0400 |
commit | e0b401e3fef0f81fd87434793db1adb0d7568058 (patch) | |
tree | c0f68108b5d37ee18f15b4dfb0b48f234917808c | |
parent | 45df5d3dc0c7289c1e67afe6d2ba806ad5174314 (diff) |
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: Huaisheng Ye <yehs1@lenovo.com>
Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
-rw-r--r-- | drivers/dax/super.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/dax/super.c b/drivers/dax/super.c index 903d9c473749..c2f42b1f3363 100644 --- a/drivers/dax/super.c +++ b/drivers/dax/super.c | |||
@@ -88,7 +88,6 @@ bool __bdev_dax_supported(struct block_device *bdev, int blocksize) | |||
88 | bool dax_enabled = false; | 88 | bool dax_enabled = false; |
89 | pgoff_t pgoff; | 89 | pgoff_t pgoff; |
90 | int err, id; | 90 | int err, id; |
91 | void *kaddr; | ||
92 | pfn_t pfn; | 91 | pfn_t pfn; |
93 | long len; | 92 | long len; |
94 | char buf[BDEVNAME_SIZE]; | 93 | char buf[BDEVNAME_SIZE]; |
@@ -114,7 +113,7 @@ bool __bdev_dax_supported(struct block_device *bdev, int blocksize) | |||
114 | } | 113 | } |
115 | 114 | ||
116 | id = dax_read_lock(); | 115 | id = dax_read_lock(); |
117 | len = dax_direct_access(dax_dev, pgoff, 1, &kaddr, &pfn); | 116 | len = dax_direct_access(dax_dev, pgoff, 1, NULL, &pfn); |
118 | dax_read_unlock(id); | 117 | dax_read_unlock(id); |
119 | 118 | ||
120 | put_dax(dax_dev); | 119 | put_dax(dax_dev); |