Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2125169rwl; Thu, 13 Apr 2023 01:52:48 -0700 (PDT) X-Google-Smtp-Source: AKy350YMfKS99zE2xVtd9EfhJh6NR5wBbsP+u+P+WtiCJgLBbBNPST1czuesCGYA9+AxnM8LvirQ X-Received: by 2002:a17:903:1209:b0:1a6:48e6:ea8e with SMTP id l9-20020a170903120900b001a648e6ea8emr1513154plh.4.1681375967979; Thu, 13 Apr 2023 01:52:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681375967; cv=none; d=google.com; s=arc-20160816; b=KE6dsqmTDaio0O6Q5d1vDXJrqeBer31YHluD0Nzh8y/C51XB0yBJ/ZKekhnDRjbrhr WAjz70VpfqYrg4b4Ydg/8o0cIoePdnSOZdQ7AtnqgXhVuXtd0sb/tmWOQpc7CUc987y4 wpxIZeS/ZLF6mh6/EOeKjjmwZng9FEL+cs/fHVDVPqy7DIokI1bXvdsSrdLAsBOi+vIn ij5RE5S1GrjhCoKTtw6MIUv92za6N9r1wu4rfedclYZUUc4hGfZVZIANZtCqx3rL2Xq6 Atdmz9pUI293inzlbWGyvVjTPfmg6CEoz7oM2Tyqcl39GuH5KtGmZ3w6GPUQxsmRZB2o arTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zqeYJxKpbpADcsi+GjjFQcA/vJWyOX2R4c8J3BAVvBU=; b=YYqMraF7EnGdIKFeFx+gDisB1mOF5ImzHUnYElpTT9Z89ihi7KGbGhupIndxeFfHCQ 4/ecX++190GQmfdOH4TVXAZXbspeuh7QxSuGH+sXWHDqm7L1HO5IT3wTtKcfx0i8N4lQ CZO0QzYBnd7XFzWKFGfNnFzqmr2Y/fLJKE3o9mVs7V0L8quCWjmIDtWpPS80htwfEhT9 a2TYA68BJ2HX+AMdwPeZgG6DnwJ7phRhN/JHBJyktISsXddkz7yyKrYwVihLhHvoQbWF n67wrkQeSYwCcKkaU3KM4+STNxAa1qZMt9aD6Ap9VSy/fIxQ/xn5qmzCRv1sZIkUERWJ od6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=iFRkkLKF; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jk22-20020a170903331600b0019931c82e24si1522393plb.195.2023.04.13.01.52.34; Thu, 13 Apr 2023 01:52:47 -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=@gmail.com header.s=20221208 header.b=iFRkkLKF; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230236AbjDMIlx (ORCPT + 99 others); Thu, 13 Apr 2023 04:41:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230061AbjDMIln (ORCPT ); Thu, 13 Apr 2023 04:41:43 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6551383F8; Thu, 13 Apr 2023 01:41:42 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-63b145b3b03so2014451b3a.1; Thu, 13 Apr 2023 01:41:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681375301; x=1683967301; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zqeYJxKpbpADcsi+GjjFQcA/vJWyOX2R4c8J3BAVvBU=; b=iFRkkLKFh6j30/LTvw3dIYG9nRwKWYufZizVg/AOYfT9itVbu9m2Rl7KwKUsCEzmO3 jwM/WskIOOfZJpNIs37Yl3r5CkWYgyTmLHgpdkx9Kb3gGSN+DEQbtU9vuVbM0UmDZhG2 Y81n1dhAAnSmRCy/zs81kpdI1GuPA4MYbJun7o2MJeN95sQpRnjHwglcn8lkHnh0e3Ad GUz8fs9sCXX3jI7EXD8bs/bAa//UB9HcJKGWqPzh59Bh7643jR8XFpIMM+w8RXYaM7Xh tBVNsQOKqw3bILAhuSitTw4OJPcEzN90ILyz+5xHOiI0K28KSDJrOyctUJn5fM03BFOG bQ/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681375301; x=1683967301; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zqeYJxKpbpADcsi+GjjFQcA/vJWyOX2R4c8J3BAVvBU=; b=EOkO3fO4vqyu6IX378AICnpMnDjUtFbVS1x5tcCbg1C1n4Xo0xyj5rOvan+5XDR1Sg FlSKEQgXgMPefk895MK93n+ASGkmEfUSVsQxEF+of/o7W7OYqUkKUirbKxdOHnAGhj0+ njj7esG2uoyEXgPdZD/qzL9tOLyyu/huHw+qoD88fYeilgOtE6ORK42vqulEeTocX7d5 QYc4JamTH3pSBw44PGZsxM5qXjdDN6bDn8SVhF2n+AW537JxF+/k1qA8axdwpIlfdEKw LMZEdH2WMfFiZpso4nhaf0dM37Po1lxBkWxE88fdbhezquKe1Odt3hxLiK1dvqCzHPOm bQaQ== X-Gm-Message-State: AAQBX9ft0aPGNBffcnWcvfoHMma3Ygk6+LvUwcCPgGsWsDQNsY52t1jX S2fiAKCgAvVZ1vHX/1TST1F+pWRClHU= X-Received: by 2002:a05:6a00:3086:b0:633:9db8:c23b with SMTP id bh6-20020a056a00308600b006339db8c23bmr5916710pfb.12.1681375301640; Thu, 13 Apr 2023 01:41:41 -0700 (PDT) Received: from rh-tp.. ([2406:7400:63:7035:9095:349e:5f0b:ded0]) by smtp.gmail.com with ESMTPSA id g8-20020aa78188000000b0063b23c92d02sm817243pfi.212.2023.04.13.01.41.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Apr 2023 01:41:41 -0700 (PDT) From: "Ritesh Harjani (IBM)" To: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org Cc: Jan Kara , Christoph Hellwig , "Darrick J . Wong" , Ojaswin Mujoo , Disha Goel , "Ritesh Harjani (IBM)" Subject: [RFCv3 09/10] iomap: Minor refactor of iomap_dio_rw Date: Thu, 13 Apr 2023 14:10:31 +0530 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 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) --- 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