From 921d110ca96d24a1c76cb70bd1387cd59b7e9c39 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sun, 24 Oct 2010 19:40:24 +0200 Subject: [PATCH] --- yaml --- r: 217819 b: refs/heads/master c: d895a1c96af8c2a0f6a5e0119695a7c6b92df8db h: refs/heads/master i: 217817: baf26a4af27f49cbb4ae0fc405291580d02e0f90 217815: 0086e4718f29f376fae0e1e2179d89c134803820 v: v3 --- [refs] | 2 +- trunk/fs/inode.c | 20 ++------------------ 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/[refs] b/[refs] index a0e474c93489..dd2afdded962 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7ccf19a8042e343f8159f8a5fdd6a9422aa90c78 +refs/heads/master: d895a1c96af8c2a0f6a5e0119695a7c6b92df8db diff --git a/trunk/fs/inode.c b/trunk/fs/inode.c index 09e2d7a5f1d2..1bf2be41257a 100644 --- a/trunk/fs/inode.c +++ b/trunk/fs/inode.c @@ -482,26 +482,10 @@ static void dispose_list(struct list_head *head) */ static int invalidate_list(struct list_head *head, struct list_head *dispose) { - struct list_head *next; + struct inode *inode, *next; int busy = 0; - next = head->next; - for (;;) { - struct list_head *tmp = next; - struct inode *inode; - - /* - * We can reschedule here without worrying about the list's - * consistency because the per-sb list of inodes must not - * change during umount anymore, and because iprune_sem keeps - * shrink_icache_memory() away. - */ - cond_resched_lock(&inode_lock); - - next = next->next; - if (tmp == head) - break; - inode = list_entry(tmp, struct inode, i_sb_list); + list_for_each_entry_safe(inode, next, head, i_sb_list) { if (inode->i_state & I_NEW) continue; if (atomic_read(&inode->i_count)) {