Skip to contentSkip to conversation

vfs: add cond_resched_lock while scanning dentry LRU lists

PATCH Superseded Kentaro Makita 1 participant 1 message Jun 9, 2008 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 vfs: add cond_resched_lock while scanning dentry LRU lists

o add cond_resched_lock(&dcache_lock) while scanning LRU lists on superblocks in __shrink_dcache_sb()

---
 fs/dcache.c |    1 +
 1 files changed, 1 insertion(+)
fs/dcache.c +1 -0
Index: b/fs/dcache.c
===================================================================
@@ -484,6 +484,7 @@ restart:
 				if (--cnt == 0)
 					break;
 			}
+			cond_resched_lock(&dcache_lock);
 		}
 	}
 	while (!list_empty(&tmp)) {