lkml.org 
[lkml]   [2015]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH tip/core/rcu 11/13] rculist: Make list_entry_rcu() use lockless_dereference()
From
Date


On 10/28/2015 09:33 AM, Ingo Molnar wrote:
>
> * Tejun Heo <tj@kernel.org> wrote:
>
>> Subject: writeback: don't use list_entry_rcu() for pointer offsetting in bdi_split_work_to_wbs()
>>
>> bdi_split_work_to_wbs() uses list_for_each_entry_rcu_continue() to
>> walk @bdi->wb_list. To set up the initial iteration condition, it
>> uses list_entry_rcu() to calculate the entry pointer corresponding to
>> the list head; however, this isn't an actual RCU dereference and using
>> list_entry_rcu() for it ended up breaking a proposed list_entry_rcu()
>> change because it was feeding an non-lvalue pointer into the macro.
>>
>> Don't use the RCU variant for simple pointer offsetting. Use
>> list_entry() instead.
>>
>> Signed-off-by: Tejun Heo <tj@kernel.org>
>> ---
>> fs/fs-writeback.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
>> index 29e4599..7378169 100644
>> --- a/fs/fs-writeback.c
>> +++ b/fs/fs-writeback.c
>> @@ -779,8 +779,8 @@ static void bdi_split_work_to_wbs(struct backing_dev_info *bdi,
>> bool skip_if_busy)
>> {
>> struct bdi_writeback *last_wb = NULL;
>> - struct bdi_writeback *wb = list_entry_rcu(&bdi->wb_list,
>> - struct bdi_writeback, bdi_node);
>> + struct bdi_writeback *wb = list_entry(&bdi->wb_list,
>> + struct bdi_writeback, bdi_node);
>>
>> might_sleep();
>
> Any objections against me applying this fix to tip:core/rcu so that I can push the
> recent RCU changes towards linux-next without triggering a build failure?

No objection on my side but probably you are waiting for an ack from
somebody else.
--
Pat


\
 
 \ /
  Last update: 2015-10-28 22:01    [W:0.122 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site