Re:Re: [PATCH v2] dm-crypt: refactor buffer allocation retry handling
From: Runyu Xiao
Date: Tue Aug 11 2026 - 11:29:39 EST
Hi Mikulas,
Thanks for reviewing this.
I initially interpreted the goto retry path as being reachable after
bio_alloc_lock was acquired. After rechecking mempool_alloc() in v6.1.66,
I found that it returns NULL only without __GFP_DIRECT_RECLAIM. With that
flag set, it waits and retries when the pool is empty.
The first allocation failure happens before bio_alloc_lock is acquired,
while the later allocation is performed with the mutex held and does not
take the NULL retry path in normal process context. Therefore, I cannot
justify the suspected double acquisition, and the refactoring provides no
functional benefit.
I will drop this patch.
Regards,
Runyu