Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2527956rwl; Thu, 13 Apr 2023 07:37:18 -0700 (PDT) X-Google-Smtp-Source: AKy350aevG9o3E+myKwwjKDX/hyvg2q50vkPbCb4XyfQkelzB2SkRgSFgHAVJYK0ZlC0shWXPcGE X-Received: by 2002:a05:6402:74d:b0:506:75bb:22a3 with SMTP id p13-20020a056402074d00b0050675bb22a3mr1587269edy.9.1681396638728; Thu, 13 Apr 2023 07:37:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681396638; cv=none; d=google.com; s=arc-20160816; b=QTMF1h9WdvahDAr4jhRVh5MRfpjbePEESb3IjZckW2utVzpeHd5gsdJsBzClTKMP5S gDHpnPGl498zXMPSfkBefOrDVzGWSFBfbvVrxoCQWRIRVgd4CG+VdxEg6tnmwHiWbxXh w2I76VpuSeGR1AvDFO3O5g5T93goaTtIyI637Uxtm8uZpvg6vTwvt6p8n7YsG2xFlfCB ZFdu031RvhcKsL/WfHfJ7nh2fYZsdf7ulkMX78dMWiE/WNkgAyMlX/ePExy4J7JM5koz P/Tm3IOmq23ZQldxW023D1Oo2xxl/wkE+StLVZz2gM84Vg2FPq7frHcgYTItKjtVdROg UCPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cFkHlrl0UDF+1q1MI669l9luPcVWWB3W99aYzTiGQ7c=; b=TPmQBIoFo2gpLfIHjDMi81bnZCRFOriU7InHQjOI8ReyEAPAe5osbCG06eBob5qSos lj2iaUz7IPcWl8VxP9bCL0ChvBWgylDyMuB3QJLcVZ5Tdr9hNYhytlgLPIGK7dderiNE 9SE7pKOeH7Tz1Le8LtoWIzuqbugN+mbJaT3+4pVvHxnrSXcautwNsPIsxXaT59I4d61K i4LRJAar8LZhNoEh7adYeom35APIu88KYGwyfPpCvd4TJspzrjj9yTJIlfq8B2Gz23Pd CEdYgVUCtDf4+dkP75c1zHH8bD87GcAD3EcDAr5HK8KiImNkFtNHjk/k1+x+02MyngDN WIIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="IygBUGt/"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x25-20020aa7d6d9000000b005048af6cedfsi1852072edr.69.2023.04.13.07.36.54; Thu, 13 Apr 2023 07:37:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="IygBUGt/"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229995AbjDMOfe (ORCPT + 99 others); Thu, 13 Apr 2023 10:35:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229958AbjDMOfd (ORCPT ); Thu, 13 Apr 2023 10:35:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 712B69EF3; Thu, 13 Apr 2023 07:35:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F15BC636F5; Thu, 13 Apr 2023 14:35:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59579C433D2; Thu, 13 Apr 2023 14:35:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681396531; bh=OR4wXytJeJ8PfNpSiJLj2Sj5lxkZ7WbHFnsLJfiRsK0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IygBUGt/a8+wd0iN9ilGGvrrLnzygjRU7VI8ZwXPzRHforodvbyT8JCVENwhS4YCp zKQyEjl1Mc5H3SIRAOR3go7XzjKYPQoceTuSOlR1qz5uBHKp1ur6RGDehYeQr+5Svy 0Xq3NoY2rsqKixy0zkL40UofekTiejeq1hnLb+VK3ieSbJC+NDUQang3Gnb4kqhgbo NGqpqHp2pJKmXPbJIUIufX93GDZgIRgVetPlKdJNxkHtuxtuCnif/SODQ3/NxhMfzE cKZLrNkZYXM/wA8hDRQcENpHuEiAeoND29vJnLTpubWH1wRQnzrA1ObVJyDeWfYvj+ aQ0xYkB6v0EAA== Date: Thu, 13 Apr 2023 07:35:30 -0700 From: "Darrick J. Wong" To: "Ritesh Harjani (IBM)" Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, Jan Kara , Christoph Hellwig , Ojaswin Mujoo , Disha Goel Subject: Re: [RFCv3 09/10] iomap: Minor refactor of iomap_dio_rw Message-ID: <20230413143530.GC360877@frogsfrogsfrogs> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Apr 13, 2023 at 02:10:31PM +0530, Ritesh Harjani (IBM) wrote: > The next patch brings in the tracepoint patch for iomap DIO functions. > This is a small refactor change for having a single out path. > > Tested-by: Disha Goel > Signed-off-by: Ritesh Harjani (IBM) IMHO this could've been part of the next patch instead of separate, but eh, whatever, looks good to me. Reviewed-by: Darrick J. Wong --D > --- > fs/iomap/direct-io.c | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c > index 36ab1152dbea..5871956ee880 100644 > --- a/fs/iomap/direct-io.c > +++ b/fs/iomap/direct-io.c > @@ -679,11 +679,16 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter, > unsigned int dio_flags, void *private, size_t done_before) > { > struct iomap_dio *dio; > + ssize_t ret = 0; > > dio = __iomap_dio_rw(iocb, iter, ops, dops, dio_flags, private, > done_before); > - if (IS_ERR_OR_NULL(dio)) > - return PTR_ERR_OR_ZERO(dio); > - return iomap_dio_complete(dio); > + if (IS_ERR_OR_NULL(dio)) { > + ret = PTR_ERR_OR_ZERO(dio); > + goto out; > + } > + ret = iomap_dio_complete(dio); > +out: > + return ret; > } > EXPORT_SYMBOL_GPL(iomap_dio_rw); > -- > 2.39.2 >