lkml.org 
[lkml]   [2017]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] hlist_add_tail_rcu disable sparse warning
    On Fri, 10 Feb 2017 19:39:49 +0200
    "Michael S. Tsirkin" <mst@redhat.com> wrote:

    > diff --git a/include/linux/rculist.h b/include/linux/rculist.h
    > index 4f7a956..bf578e8 100644
    > --- a/include/linux/rculist.h
    > +++ b/include/linux/rculist.h
    > @@ -509,7 +509,7 @@ static inline void hlist_add_tail_rcu(struct hlist_node *n,
    > {
    > struct hlist_node *i, *last = NULL;
    >
    > - for (i = hlist_first_rcu(h); i; i = hlist_next_rcu(i))
    > + for (i = h->first; i; i = i->next)

    Looks good to me, but I would probably add a comment above the loop
    about this being in a write side section, and rcu conversions are not
    needed.

    Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

    -- Steve

    > last = i;
    >
    > if (last) {

    \
     
     \ /
      Last update: 2017-02-27 19:41    [W:7.615 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site