Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1040241imm; Wed, 25 Jul 2018 10:25:00 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfOggTJwj5h/CT9786IX/3tzLy8FOtJvFgBvo0bGnYeWRhvb5tqwW6gF6O8QIvmtQyqU/0K X-Received: by 2002:a17:902:758c:: with SMTP id j12-v6mr21748948pll.195.1532539500933; Wed, 25 Jul 2018 10:25:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532539500; cv=none; d=google.com; s=arc-20160816; b=EXhuhlWpmVqRfm2fJAVRvEu65zhY1nFHF28Hk0OVGQPSE0n//RmXtlIAS8n8o0lMJU ycSZaqNo/sTk1VKMLgfcgXqSBYgU23OZvN463cTC2kx6APkQzeHGnbetMRad5buhh73C IyyQj7s/z49SL4IT6W53hlHLdDma7KTqnxeRWe35u++VLiuz8UaKXaui02HeN1jCtbOW xVfkjbYf9bgpsFM4M6/0m2PG4vC87uhia3Rgxa4ExJlPn/TeYEork8m87VY+909bCutY nU+yk36uFh+dN4QZ0QKi3P8Sl3EiuFFX5qLFgJdk8ZsZ/WToDfVQQsNz93YUX0p7ohdQ /ovg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=ayLrexAkexvgcbK/1J4wKr92WTUVSpp8QKhCO9MPWks=; b=NAB9sZya+hSX9tKHWwODOruf4MYDAIEniKdXGY6s3FNtWhnoma58VzFr5oaB/wV5zt lUYStxm1eHHN33jRDL0Ef9RgXs8NY1St38RdBe/YpJGG1m0Bz1cEhfo5kTlXCp8mBRz/ 42w2h35FLhw51rjsBcZNLCqIP3y56xsYuTZz5H4hxzIlhyfQR6COpGYK0C57N5mVpmp8 oHpDCx7u6mGMjD0NHmWkJTFhFecpbtgfTYdPEUZvrS2A1sH/UKprCXgYyaTAqjKCLy75 BTcklfnTxRZkp/GIK0b8PDwSJZLtsZ+Hr3rcusGnVAhyM3NA1LL/DqClUL/YEeGQuxoK NCOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b59-v6si13559295plc.335.2018.07.25.10.24.45; Wed, 25 Jul 2018 10:25:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729343AbeGYSfz (ORCPT + 99 others); Wed, 25 Jul 2018 14:35:55 -0400 Received: from mga05.intel.com ([192.55.52.43]:58085 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728741AbeGYSfz (ORCPT ); Wed, 25 Jul 2018 14:35:55 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2018 10:23:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,401,1526367600"; d="scan'208";a="59425294" Received: from theros.lm.intel.com (HELO linux.intel.com) ([10.232.112.164]) by orsmga007.jf.intel.com with ESMTP; 25 Jul 2018 10:23:16 -0700 Date: Wed, 25 Jul 2018 11:23:16 -0600 From: Ross Zwisler To: Huaisheng Ye Cc: linux-nvdimm@lists.01.org, dan.j.williams@intel.com, ross.zwisler@linux.intel.com, willy@infradead.org, vishal.l.verma@intel.com, dave.jiang@intel.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, viro@zeniv.linux.org.uk, martin.petersen@oracle.com, axboe@kernel.dk, gregkh@linuxfoundation.org, bart.vanassche@wdc.com, jack@suse.cz, agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org, chengnt@lenovo.com, colyli@suse.de, Huaisheng Ye Subject: Re: [PATCH v2 0/6] kaddr and pfn can be NULL to ->direct_access() Message-ID: <20180725172316.GA12896@linux.intel.com> Mail-Followup-To: Ross Zwisler , Huaisheng Ye , linux-nvdimm@lists.01.org, dan.j.williams@intel.com, willy@infradead.org, vishal.l.verma@intel.com, dave.jiang@intel.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, viro@zeniv.linux.org.uk, martin.petersen@oracle.com, axboe@kernel.dk, gregkh@linuxfoundation.org, bart.vanassche@wdc.com, jack@suse.cz, agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org, chengnt@lenovo.com, colyli@suse.de, Huaisheng Ye References: <20180725162849.8320-1-yehs2007@zoho.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180725162849.8320-1-yehs2007@zoho.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 26, 2018 at 12:28:43AM +0800, Huaisheng Ye wrote: > From: Huaisheng Ye > > Changes since v1 [1]: > * Involve the previous patches for pfn can be NULL. > * Reword the patch descriptions according to Christian's comment. > * According to Ross's suggestion, replace local pointer dummy_addr > with NULL within md/dm-writecache for direct_access. > > [1]: https://lkml.org/lkml/2018/7/24/199 > > Some functions within fs/dax, dax/super and md/dm-writecache don't > need to get local pointer kaddr or variable pfn from direct_access. > Assigning NULL to kaddr or pfn to ->direct_access() is more > straightforward and simple than offering a useless local pointer or > variable. > > So all ->direct_access() need to check the validity of pointer kaddr > and pfn for NULL assignment. If either of them is equal to NULL, that > is to say callers may have no need for kaddr or pfn, so this series of > patch are prepared for allowing them to pass in NULL instead of having > to pass in a local pointer or variable that they then just throw away. Looks good. For the series: Reviewed-by: Ross Zwisler