From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 12 Sep 2018 08:02:24 +1000 From: Dave Chinner To: Waiman Long Cc: Alexander Viro , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, "Luis R. Rodriguez" , Kees Cook , Linus Torvalds , Jan Kara , "Paul E. McKenney" , Andrew Morton , Ingo Molnar , Miklos Szeredi , Matthew Wilcox , Larry Woodman , James Bottomley , "Wangkai (Kevin C)" , Michal Hocko Subject: Re: [PATCH v3 1/4] fs/dcache: Fix incorrect nr_dentry_unused accounting in shrink_dcache_sb() Message-ID: <20180911220224.GE5631@dastard> References: <1536693506-11949-1-git-send-email-longman@redhat.com> <1536693506-11949-2-git-send-email-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1536693506-11949-2-git-send-email-longman@redhat.com> Sender: owner-linux-mm@kvack.org List-ID: On Tue, Sep 11, 2018 at 03:18:23PM -0400, Waiman Long wrote: > The nr_dentry_unused per-cpu counter tracks dentries in both the > LRU lists and the shrink lists where the DCACHE_LRU_LIST bit is set. > The shrink_dcache_sb() function moves dentries from the LRU list to a > shrink list and subtracts the dentry count from nr_dentry_unused. This > is incorrect as the nr_dentry_unused count Will also be decremented in > shrink_dentry_list() via d_shrink_del(). To fix this double decrement, > the decrement in the shrink_dcache_sb() function is taken out. > > Fixes: 4e717f5c1083 ("list_lru: remove special case function list_lru_dispose_all." > > Signed-off-by: Waiman Long Please add a stable tag for this. Otherwise looks fine. Reviewed-by: Dave Chinner -- Dave Chinner david@fromorbit.com