All of lore.kernel.org
 help / color / mirror / Atom feed
From: lijian_8010a29@163.com
To: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com
Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	lijian <lijian@yulong.com>
Subject: [PATCH] fs: ntfs: super: added return error value while map failed
Date: Tue, 29 Jun 2021 09:53:33 +0000	[thread overview]
Message-ID: <20210629095333.115111-1-lijian_8010a29@163.com> (raw)

From: lijian <lijian@yulong.com>

When lookup_extent_mapping failed, should return '-ENOENT'.

Signed-off-by: lijian <lijian@yulong.com>
---
 fs/btrfs/extent_map.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index 4a8e02f7b6c7..e9d9f2bfc11d 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -305,8 +305,10 @@ int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len,
 
 	WARN_ON(!em || em->start != start);
 
-	if (!em)
+	if (!em) {
+		ret = -ENOENT;
 		goto out;
+	}
 
 	em->generation = gen;
 	clear_bit(EXTENT_FLAG_PINNED, &em->flags);
-- 
2.17.1



             reply	other threads:[~2021-06-29 10:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-29  9:53 lijian_8010a29 [this message]
2021-06-29 12:30 ` [PATCH] fs: ntfs: super: added return error value while map failed Qu Wenruo
2021-06-29 13:10 ` Johannes Thumshirn

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=20210629095333.115111-1-lijian_8010a29@163.com \
    --to=lijian_8010a29@163.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=lijian@yulong.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.