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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180725162849.8320-6-yehs2007@zoho.com>
Date:   Thu, 26 Jul 2018 00:28:48 +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, dm-devel@...hat.com,
        linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, chengnt@...ovo.com, colyli@...e.de,
        Huaisheng Ye <yehs1@...ovo.com>
Subject: [PATCH v2 5/6] md/dm-writecache: Don't request pointer dummy_addr when not required

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

Function persistent_memory_claim doesn't need to get local pointer
dummy_addr from direct_access. Using NULL instead of having to pass
in a useless local pointer that caller then just throw away.

Suggested-by: Ross Zwisler <ross.zwisler@...ux.intel.com>
Signed-off-by: Huaisheng Ye <yehs1@...ovo.com>
---
 drivers/md/dm-writecache.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c
index 87107c9..9d79084 100644
--- a/drivers/md/dm-writecache.c
+++ b/drivers/md/dm-writecache.c
@@ -268,9 +268,8 @@ static int persistent_memory_claim(struct dm_writecache *wc)
 		i = 0;
 		do {
 			long daa;
-			void *dummy_addr;
 			daa = dax_direct_access(wc->ssd_dev->dax_dev, i, p - i,
-						&dummy_addr, &pfn);
+						NULL, &pfn);
 			if (daa <= 0) {
 				r = daa ? daa : -EINVAL;
 				goto err3;
-- 
1.8.3.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ