lkml.org 
[lkml]   [2023]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] nbd: pass nbd_sock to nbd_read_reply() instead of index
From
Date
在 2023/10/30 20:42, Ming Lei 写道:

>> After reviewing some code, I found that it's wrong to grab config_lock,
>> because other context will grab such lock and flush_workqueue(), and
>> there is no gurantee that recv_work() will grab the lock first.
>>
>> Will it be acceptable to export blk_queue_enter()? I can't think of
>> other way to retrieve the`nsock` reference at the entry of recv_work().
>
> Then I think it is easier to pass `nsock` from `recv_thread_args`, which
> can be thought as local variable too.
>
> Reviewed-by: Ming Lei <ming.lei@redhat.com>

Agreed

Reviewed-by: Yu Kuai <yukuai3@huawei.com>

\
 
 \ /
  Last update: 2023-10-30 14:17    [W:0.114 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site