[PATCH 0/2] btrfs: clean up two FIXMEs related to btrfs_search_slot output handling

Adarsh Das posted 2 patches 3 days, 21 hours ago
fs/btrfs/inode.c   | 15 ++++++++++++---
fs/btrfs/volumes.c | 10 ++++++++--
2 files changed, 20 insertions(+), 5 deletions(-)
[PATCH 0/2] btrfs: clean up two FIXMEs related to btrfs_search_slot output handling
Posted by Adarsh Das 3 days, 21 hours ago
Both patches fix cases where a search with offset (u64)-1 gets an
unexpected exact match. The first silently returned success, and the
second crashed the kernel. Both now both log an error and return -EUCLEAN.

Adarsh Das (2):
  btrfs: handle unexpected exact match in btrfs_set_inode_index_count()
  btrfs: replace BUG() with error handling in __btrfs_balance()

 fs/btrfs/inode.c   | 15 ++++++++++++---
 fs/btrfs/volumes.c | 10 ++++++++--
 2 files changed, 20 insertions(+), 5 deletions(-)

-- 
2.53.0
Re: [PATCH 0/2] btrfs: clean up two FIXMEs related to btrfs_search_slot output handling
Posted by David Sterba 3 days, 1 hour ago
On Tue, Feb 03, 2026 at 10:53:55PM +0530, Adarsh Das wrote:
> Both patches fix cases where a search with offset (u64)-1 gets an
> unexpected exact match. The first silently returned success, and the
> second crashed the kernel. Both now both log an error and return -EUCLEAN.
> 
> Adarsh Das (2):
>   btrfs: handle unexpected exact match in btrfs_set_inode_index_count()
>   btrfs: replace BUG() with error handling in __btrfs_balance()

Added to for-next, thanks.
Re: [PATCH 0/2] btrfs: clean up two FIXMEs related to btrfs_search_slot output handling
Posted by Qu Wenruo 3 days, 18 hours ago

在 2026/2/4 03:53, Adarsh Das 写道:
> Both patches fix cases where a search with offset (u64)-1 gets an
> unexpected exact match. The first silently returned success, and the
> second crashed the kernel. Both now both log an error and return -EUCLEAN.

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu

> 
> Adarsh Das (2):
>    btrfs: handle unexpected exact match in btrfs_set_inode_index_count()
>    btrfs: replace BUG() with error handling in __btrfs_balance()
> 
>   fs/btrfs/inode.c   | 15 ++++++++++++---
>   fs/btrfs/volumes.c | 10 ++++++++--
>   2 files changed, 20 insertions(+), 5 deletions(-)
>