Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1098309pxf; Fri, 2 Apr 2021 00:48:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxj8KpYRYJvhmhkIyD/8I4MVI5QEIv4zmb0jBs+cS8F/FJQIFoh42Aw+T2Ab8cM6qsu6dYZ X-Received: by 2002:a5d:9ac4:: with SMTP id x4mr9841855ion.117.1617349684203; Fri, 02 Apr 2021 00:48:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617349684; cv=none; d=google.com; s=arc-20160816; b=sQlewRynHIuqhFYqlhiq46KDn74QwhK2VxMLFTdgX/IeBKrOeh2E3A45ObhK318Er2 Lggzpwh7senLHlvPY5t0DMdtrYva2mXALzHuKBThqcDYFVMvUMSJT6lpD8xBJ4+KcfF/ xOcvNVUPvt3CeACHlf9WIYjsHK/PFob24NHCpsQ6v99L8TiLns1w/PfA/VNd/mQ0lyyv GfFfPRUcXK+GUXEzCcmgE3Us6hQ17DgrpWZsi3a3aBGwQ3QFlQYpIopdS/hJmzaS9V3m 9pVwzhSk5qOZ8BhlXQyyS3IqrnUH5FNAiv5dYNhEyTecmfd2pdzveqj/I7U30sRax3AK 1dSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=5Vta6Cj9q/3ZnMObvCqvvx3Z3XDxjAq5Hso5ndSuqbE=; b=0VcOnJlQQcMDgiOG8gQprxCYnyYZ+KWiE/42uElo8OjiaNaVGDp7yGHmCURlnfJfJ/ 38IxN8wKQiUXHFJpzSZ5lAHiQBkKFTFVTrfnoGp6U3qP3Ygh5Ipm7bJPclF7RjWuwH9v +yXxn6gqSKVIlsjsb5rIGGg6Wwy3sXUMv/YU9n0yjEVCMy1s4IS0kI5cuSuGx4Kot62x ZIfpv8g0Op2S+csiePkG41TvcSeQ/ETY0AP7VPBpw16LOLGg3FPVA7LrV+RkK+tIz1u7 HoWOXCJMSW2i0XlE+yrhibLHZ62rA8T/ZOSeekvocgK0m8PGF1CImZclyx1SaMPVka5V LJLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c12si6952592jaq.69.2021.04.02.00.47.49; Fri, 02 Apr 2021 00:48:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234265AbhDBHr0 (ORCPT + 99 others); Fri, 2 Apr 2021 03:47:26 -0400 Received: from verein.lst.de ([213.95.11.211]:42814 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233901AbhDBHrZ (ORCPT ); Fri, 2 Apr 2021 03:47:25 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 478DE68BEB; Fri, 2 Apr 2021 09:47:21 +0200 (CEST) Date: Fri, 2 Apr 2021 09:47:20 +0200 From: Christoph Hellwig To: Shiyang Ruan Cc: linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-nvdimm@lists.01.org, linux-fsdevel@vger.kernel.org, darrick.wong@oracle.com, dan.j.williams@intel.com, willy@infradead.org, jack@suse.cz, viro@zeniv.linux.org.uk, linux-btrfs@vger.kernel.org, ocfs2-devel@oss.oracle.com, david@fromorbit.com, hch@lst.de, rgoldwyn@suse.de Subject: Re: [PATCH v3 02/10] fsdax: Factor helper: dax_fault_actor() Message-ID: <20210402074720.GA7057@lst.de> References: <20210319015237.993880-1-ruansy.fnst@fujitsu.com> <20210319015237.993880-3-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210319015237.993880-3-ruansy.fnst@fujitsu.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + if (!pmd) > + return dax_load_hole(xas, mapping, &entry, vmf); > + else > + return dax_pmd_load_hole(xas, vmf, iomap, &entry); > + if (pmd) > + return vmf_insert_pfn_pmd(vmf, pfn, write); > + if (write) > + return vmf_insert_mixed_mkwrite(vmf->vma, vmf->address, pfn); > + else > + return vmf_insert_mixed(vmf->vma, vmf->address, pfn); > +} No need for else statements after returning. Otherwise looks good: Reviewed-by: Christoph Hellwig