Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1918580pxa; Mon, 3 Aug 2020 02:35:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIGeQEmm0XLzca8f3xmzsHJxV/ft69dvc+9SGLWD3ax1gKJX8FKlZqKklxH9PLRnSV/Fn8 X-Received: by 2002:a05:6402:1a46:: with SMTP id bf6mr14723480edb.284.1596447355533; Mon, 03 Aug 2020 02:35:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596447355; cv=none; d=google.com; s=arc-20160816; b=zD7yZ46HLCO0S+ySbDjt6sWlXFSBpZt/Tq01HNan1ATh+apeSyTdNDnjfSqlIIVACs EEq5PNbLb84PYYK0KOuiJ0/MbAr7XQueNNMitAG7E30wLdnFPAuI9CupKWgJJsQ4lpHM ISpLxoej2mR41WmVMT9MBSX2qABRXBaPI78JvhDuseIcsQx5qoyDt5iWc1uGOaIDroNe IvHoIwHMdI/8cELO0AkNZvN0/857QkZEvfxFVcBvoqjIjapTWLQf4MO9udvMA1mszthB HpQHvkneN8H2pVrjd6VVPAulBz+5Jp8GnaLmQF+Djr1iFlFctvqpiR4hAowY4djWOR4L cdIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date; bh=ktS7izhSfdKigISy3KK5bbYxH99WxO9NGGjEinAInLE=; b=Nz4xXRQvksDclH+2dndMFpqbA0dFHG3JjxrOWYFKtBBHhw2cDe4iQ4SfiD12cnwFGZ XGZBv9b2of7wsJwylTqZIOSMYNJ7ecuwXysEw/MBIlmGPNHbimGkf3zXqHXAKSYSOxPZ 7mg1emauG9YLNMj7NwrJpogqQ9Se5giUTwA/SNBNUp4/gYoZIq3XrvZf9VEJk3EuPGYE Bqbr0YLZb5S5mrkxRYdgzzhMCsq4GezE7TQB+DnacrnHFC7amQz86G/ai7bCKQe4Rfll chK+Zga1OFc1VO2TcezTny8S37/iXDBk2ZAhdHdEXIXa6nl+H2eb/GD1q9e2VNZFUCpw MSiw== 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 f16si11357987edy.386.2020.08.03.02.35.33; Mon, 03 Aug 2020 02:35:55 -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 S1726239AbgHCJfL (ORCPT + 99 others); Mon, 3 Aug 2020 05:35:11 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:54180 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbgHCJfL (ORCPT ); Mon, 3 Aug 2020 05:35:11 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 5D4331C0BD4; Mon, 3 Aug 2020 11:35:08 +0200 (CEST) Date: Mon, 3 Aug 2020 11:35:06 +0200 From: Pavel Machek To: clm@fb.com, jbacik@fb.com, dsterba@suse.com, sashal@kernel.org, wqu@suse.com, nborisov@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, jungyeon@gatech.edu, stable@kernel.org Subject: [PATCH] btrfs: fix error value in btrfs_get_extent Message-ID: <20200803093506.GA19472@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HcAYCG3uE/tztfnV" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --HcAYCG3uE/tztfnV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable btrfs_get_extent() sets variable ret, but out: error path expect error to be in variable err. Fix that. Signed-off-by: Pavel Machek (CIP) --- Notice that patch introducing this problem is on its way to 4.19.137-stable. diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 7befb7c12bd3..4aaa01540f89 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -7012,7 +7012,7 @@ struct extent_map *btrfs_get_extent(struct btrfs_inod= e *inode, found_type =3D=3D BTRFS_FILE_EXTENT_PREALLOC) { /* Only regular file could have regular/prealloc extent */ if (!S_ISREG(inode->vfs_inode.i_mode)) { - ret =3D -EUCLEAN; + err =3D -EUCLEAN; btrfs_crit(fs_info, "regular/prealloc extent found for non-regular inode %llu", btrfs_ino(inode)); --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --HcAYCG3uE/tztfnV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl8n2koACgkQMOfwapXb+vL5pACgh6F0buh2LZN4PQ6G1CTLMVga FFcAoJZ6SUZZopdgsJehwPuHA2MO3TIi =+F+S -----END PGP SIGNATURE----- --HcAYCG3uE/tztfnV--