lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180730071548.9172-5-yehs2007@zoho.com>
Date:   Mon, 30 Jul 2018 15:15:46 +0800
From:   Huaisheng Ye <yehs2007@...o.com>
To:     linux-nvdimm@...ts.01.org, dan.j.williams@...el.com
Cc:     ross.zwisler@...ux.intel.com, willy@...radead.org,
        vishal.l.verma@...el.com, dave.jiang@...el.com,
        schwidefsky@...ibm.com, heiko.carstens@...ibm.com,
        viro@...iv.linux.org.uk, martin.petersen@...cle.com,
        axboe@...nel.dk, gregkh@...uxfoundation.org,
        bart.vanassche@....com, jack@...e.cz, agk@...hat.com,
        snitzer@...hat.com, keescook@...omium.org, dm-devel@...hat.com,
        linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, colyli@...e.de, chengnt@...ovo.com,
        Huaisheng Ye <yehs1@...ovo.com>
Subject: [PATCH v3 4/6] dax/super: Do not request a pointer kaddr when not required

From: Huaisheng Ye <yehs1@...ovo.com>

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@...ovo.com>
Reviewed-by: Ross Zwisler <ross.zwisler@...ux.intel.com>
---
 drivers/dax/super.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/dax/super.c b/drivers/dax/super.c
index 45276ab..6e928f3 100644
--- a/drivers/dax/super.c
+++ b/drivers/dax/super.c
@@ -89,7 +89,6 @@ bool __bdev_dax_supported(struct block_device *bdev, int blocksize)
 	struct request_queue *q;
 	pgoff_t pgoff;
 	int err, id;
-	void *kaddr;
 	pfn_t pfn;
 	long len;
 	char buf[BDEVNAME_SIZE];
@@ -122,7 +121,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);
-- 
1.8.3.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ