On 15/03/2021 06:40, Qu Wenruo wrote: > The difference against find_extent_buffer_nospinlock() is: > - Also handles regular sectorsize == PAGE_SIZE case > - No extent buffer refs increase/decrease > As extent buffer under IO must has non-zero refs.
Can these be merged into a single function? The sectorsie == PAGE_SIZE case won't do anything for find_extent_buffer_nospinlock() and the atomic_inc_not_zero(&eb->refs) can be hidden behind a 'if (write)' check. Note, I was looking at this version: https://www.spinics.net/lists/linux-btrfs/msg111188.html