From nobody Mon Jun 22 21:19:45 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24621C433EF for ; Thu, 17 Mar 2022 01:39:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349368AbiCQBlB (ORCPT ); Wed, 16 Mar 2022 21:41:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235641AbiCQBk7 (ORCPT ); Wed, 16 Mar 2022 21:40:59 -0400 Received: from out199-1.us.a.mail.aliyun.com (out199-1.us.a.mail.aliyun.com [47.90.199.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1ECB647B; Wed, 16 Mar 2022 18:39:43 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0V7Oibyl_1647481173; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0V7Oibyl_1647481173) by smtp.aliyun-inc.com(127.0.0.1); Thu, 17 Mar 2022 09:39:40 +0800 From: Jiapeng Chong To: djwong@kernel.org Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] xfs: Fix missing error code in xfs_reflink_end_cow_extent() Date: Thu, 17 Mar 2022 09:39:30 +0800 Message-Id: <20220317013930.124432-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'error'. Eliminate the follow smatch warning: fs/xfs/xfs_reflink.c:634 xfs_reflink_end_cow_extent() warn: missing error code 'error'. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reported-by: kernel test robot --- fs/xfs/xfs_reflink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c index 54e68e5693fd..7265f8850f65 100644 --- a/fs/xfs/xfs_reflink.c +++ b/fs/xfs/xfs_reflink.c @@ -631,6 +631,7 @@ xfs_reflink_end_cow_extent( if (!xfs_iext_lookup_extent_before(ip, ifp, end_fsb, &icur, &got) || got.br_startoff + got.br_blockcount <=3D offset_fsb) { *end_fsb =3D offset_fsb; + error =3D -EINVAL; goto out_cancel; } =20 --=20 2.20.1.7.g153144c