From mboxrd@z Thu Jan 1 00:00:00 1970 From: npiggin@suse.de Subject: [patch 1/5] fs: dcache fix LRU ordering Date: Sun, 26 Apr 2009 20:25:53 +1000 Message-ID: <20090426102953.114421174@suse.de> References: <20090426102552.947523845@suse.de> Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Al Viro Return-path: Received: from cantor.suse.de ([195.135.220.2]:45752 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751258AbZDZKgZ (ORCPT ); Sun, 26 Apr 2009 06:36:25 -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). Signed-off-by: Nick Piggin --- 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);