Thread (12 messages) 12 messages, 4 authors, 2021-03-16

Re: [PATCH 1/2] btrfs: fix wild pointer access during metadata read failure for subpage

From: Qu Wenruo <hidden>
Date: 2021-03-15 08:26:37


On 2021/3/15 下午3:55, Johannes Thumshirn wrote:
On 15/03/2021 06:40, Qu Wenruo wrote:
quoted
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.
That would make the eb refs change too inconsistent.

But I get your point.

How about calling find_extent_buffer_nospinlock() and then dec the refs
manually?

Thanks,
Qu
Note, I was looking at this version:
https://www.spinics.net/lists/linux-btrfs/msg111188.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help