public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] btrfs: some cleanups for two ctree functions
@ 2025-12-09  3:27 Sun YangKai
  2025-12-09  3:27 ` [PATCH 1/4] btrfs: don't set @return_any for btrfs_search_slot_for_read in btrfs_read_qgroup_config Sun YangKai
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Sun YangKai @ 2025-12-09  3:27 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Sun YangKai

The first three patches is cleanups for btrfs_search_slot_for_read().
There're only two callers that set @return_any to 1 and both of them
is unnecessary. So @return_any and related logic could be removed.

The last patch is cleanup for btrfs_prev_leaf(). Callers expect a
valid p->slots[0] to read the item's key. So make sure btrfs_prev_leaf()
return a valid p->slots[0] and remove related checks in callers.

Sun YangKai (4):
  btrfs: don't set @return_any for btrfs_search_slot_for_read in
    btrfs_read_qgroup_config
  btrfs: don't set return_any @return_any for btrfs_search_slot_for_read
    in get_last_extent()
  btrfs: cleanup btrfs_search_slot_for_read()
  btrfs: ctree: cleanup btrfs_prev_leaf()

 fs/btrfs/ctree.c           | 141 ++++++-------------------------------
 fs/btrfs/ctree.h           |   3 +-
 fs/btrfs/free-space-tree.c |   2 +-
 fs/btrfs/qgroup.c          |  10 +--
 fs/btrfs/send.c            |  22 +++---
 5 files changed, 40 insertions(+), 138 deletions(-)

-- 
2.51.2


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-02-07 15:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-09  3:27 [PATCH 0/4] btrfs: some cleanups for two ctree functions Sun YangKai
2025-12-09  3:27 ` [PATCH 1/4] btrfs: don't set @return_any for btrfs_search_slot_for_read in btrfs_read_qgroup_config Sun YangKai
2025-12-09  3:27 ` [PATCH 2/4] btrfs: don't set return_any @return_any for btrfs_search_slot_for_read in get_last_extent() Sun YangKai
2025-12-09  3:27 ` [PATCH 3/4] btrfs: cleanup btrfs_search_slot_for_read() Sun YangKai
2025-12-09  3:27 ` [PATCH 4/4] btrfs: ctree: cleanup btrfs_prev_leaf() Sun YangKai
2025-12-09  4:05   ` Sun Yangkai
2025-12-09 12:05   ` Filipe Manana
2025-12-09 12:27     ` Sun Yangkai
2026-02-07  8:50       ` Sun YangKai
2026-02-07 10:18         ` Qu Wenruo
2026-02-07 15:07           ` Sun YangKai
2025-12-09 13:57     ` Sun Yangkai
2025-12-09 14:04       ` Sun Yangkai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox