Re: [PATCH] io_uring: kill dead code in io_req_complete_post

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/2/24 12:40 PM, Pavel Begunkov wrote:
> On 3/29/24 15:47, Ming Lei wrote:
>> Since commit 8f6c829491fe ("io_uring: remove struct io_tw_state::locked"),
>> io_req_complete_post() is only called from io-wq submit work, where the
>> request reference is guaranteed to be grabbed and won't drop to zero
>> in io_req_complete_post().
>>
>> Kill the dead code, meantime add req_ref_put() to put the reference.
> 
> Interesting... a nice clean up. The assumption is too implicit to
> my taste, but should be just fine if we add
> 
> if (WARN_ON_ONCE(!(issue_flags & IO_URING_F_IOWQ)))
>     return;

And include a comment as to why that is there as well.

-- 
Jens Axboe





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux