--- fs/dcache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Index: linux-2.6/fs/dcache.c =================================================================== --- linux-2.6.orig/fs/dcache.c 2007-08-08 22:27:08.000000000 -0700 +++ linux-2.6/fs/dcache.c 2007-08-08 22:57:29.000000000 -0700 @@ -2134,7 +2134,9 @@ static void *get_dentries(struct kmem_ca * LRU and we want to reclaim those. */ if ((d_unhashed(dentry) && list_empty(&dentry->d_lru)) || - (!d_unhashed(dentry) && hlist_unhashed(&dentry->d_hash))) + (!d_unhashed(dentry) && hlist_unhashed(&dentry->d_hash)) || + (dentry->d_inode && + !mapping_cap_writeback_dirty(dentry->d_inode->i_mapping))) /* Ignore this dentry */ v[i] = NULL; else