From: npiggin@suse.de Subject: [patch 01/14] fs: dcache fix LRU ordering Date: Mon, 30 Mar 2009 02:55:40 +1100 Message-ID: <20090329155748.362472600@nick.local0.net> References: <20090329155539.275927173@nick.local0.net> To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Return-path: Received: from cantor2.suse.de ([195.135.220.15]:39822 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751612AbZC2Qh3 (ORCPT ); Sun, 29 Mar 2009 12:37:29 -0400 Content-Disposition: inline; filename=fs-dcache-order-lru.patch Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Fix ordering of LRU when moving referenced dentries to the head of the list (they should go to the head of the list in the same order as they were found from the tail, rather than reverse order). --- fs/dcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6/fs/dcache.c =================================================================== --- linux-2.6.orig/fs/dcache.c +++ linux-2.6/fs/dcache.c @@ -481,7 +481,7 @@ restart: if ((flags & DCACHE_REFERENCED) && (dentry->d_flags & DCACHE_REFERENCED)) { dentry->d_flags &= ~DCACHE_REFERENCED; - list_move_tail(&dentry->d_lru, &referenced); + list_move(&dentry->d_lru, &referenced); spin_unlock(&dentry->d_lock); } else { list_move_tail(&dentry->d_lru, &tmp);