[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6873378b-3202-e738-2366-5fb818b4a013@redhat.com>
Date: Tue, 28 Aug 2018 18:29:29 -0400
From: Waiman Long <longman@...hat.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Jonathan Corbet <corbet@....net>, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-doc@...r.kernel.org, "Luis R. Rodriguez" <mcgrof@...nel.org>,
Kees Cook <keescook@...omium.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jan Kara <jack@...e.cz>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>,
Miklos Szeredi <mszeredi@...hat.com>,
Larry Woodman <lwoodman@...hat.com>,
James Bottomley <James.Bottomley@...senPartnership.com>,
"Wangkai (Kevin C)" <wangkai86@...wei.com>,
Michal Hocko <mhocko@...nel.org>
Subject: Re: [PATCH 2/2] fs/dcache: Make negative dentries easier to be
reclaimed
On 08/28/2018 06:13 PM, Matthew Wilcox wrote:
> On Tue, Aug 28, 2018 at 01:19:40PM -0400, Waiman Long wrote:
>> @@ -134,7 +135,7 @@ bool list_lru_add(struct list_lru *lru, struct list_head *item)
>> spin_lock(&nlru->lock);
>> if (list_empty(item)) {
>> l = list_lru_from_kmem(nlru, item, &memcg);
>> - list_add_tail(item, &l->list);
>> + (add_tail ? list_add_tail : list_add)(item, &l->list);
>> /* Set shrinker bit if the first element was added */
>> if (!l->nr_items++)
>> memcg_set_shrinker_bit(memcg, nid,
> That's not OK. Write it out properly, ie:
>
> if (add_tail)
> list_add_tail(item, &l->list);
> else
> list_add(item, &l->list);
>
Yes, I can rewrite it. What is the problem with the abbreviated form?
Cheers,
Longman
Powered by blists - more mailing lists