From: David Sterba Date: Wed, 24 Jan 2024 21:29:46 +0000 (+0100) Subject: btrfs: update comment and drop assertion in extent item lookup in find_parent_nodes() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5b9579893a216de3f09018cbc9369a849a74bf41;p=linux.git btrfs: update comment and drop assertion in extent item lookup in find_parent_nodes() Same comment was added to this type of error, unify that and drop the assertion as we'd find out quickly that something is wrong after returning -EUCLEAN. Signed-off-by: David Sterba --- diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index beed7e459dabd..0fa27ed802f6f 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -1435,8 +1435,10 @@ again: if (ret < 0) goto out; if (ret == 0) { - /* This shouldn't happen, indicates a bug or fs corruption. */ - ASSERT(ret != 0); + /* + * Key with offset -1 found, there would have to exist an extent + * item with such offset, but this is out of the valid range. + */ ret = -EUCLEAN; goto out; }