From: npiggin@suse.de Subject: [patch 06/27] fs: dcache fix LRU ordering Date: Sat, 25 Apr 2009 11:20:26 +1000 Message-ID: <20090425012209.802548502@suse.de> References: <20090425012020.457460929@suse.de> To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Return-path: Received: from cantor.suse.de ([195.135.220.2]:44575 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753012AbZDYB2u (ORCPT ); Fri, 24 Apr 2009 21:28:50 -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);