linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
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
Date: Mon, 3 Aug 2020 11:35:06 +0200	[thread overview]
Message-ID: <20200803093506.GA19472@amd> (raw)

[-- Attachment #1: Type: text/plain, Size: 940 bytes --]

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) <pavel@denx.de>

---

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_inode *inode,
 	    found_type == BTRFS_FILE_EXTENT_PREALLOC) {
 		/* Only regular file could have regular/prealloc extent */
 		if (!S_ISREG(inode->vfs_inode.i_mode)) {
-			ret = -EUCLEAN;
+			err = -EUCLEAN;
 			btrfs_crit(fs_info,
 		"regular/prealloc extent found for non-regular inode %llu",
 				   btrfs_ino(inode));

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

             reply	other threads:[~2020-08-03  9:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-03  9:35 Pavel Machek [this message]
2020-08-03  9:39 ` [PATCH] btrfs: fix error value in btrfs_get_extent Nikolay Borisov
2020-08-03  9:50   ` Nikolay Borisov
2020-08-11 10:28     ` David Sterba
2020-08-11 10:25 ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200803093506.GA19472@amd \
    --to=pavel@denx.de \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=jbacik@fb.com \
    --cc=jungyeon@gatech.edu \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nborisov@suse.com \
    --cc=sashal@kernel.org \
    --cc=stable@kernel.org \
    --cc=wqu@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).