diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/inode.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/fs/inode.c b/fs/inode.c index 09e2d7a5f1d2..1bf2be41257a 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -482,26 +482,10 @@ static void dispose_list(struct list_head *head) | |||
482 | */ | 482 | */ |
483 | static int invalidate_list(struct list_head *head, struct list_head *dispose) | 483 | static int invalidate_list(struct list_head *head, struct list_head *dispose) |
484 | { | 484 | { |
485 | struct list_head *next; | 485 | struct inode *inode, *next; |
486 | int busy = 0; | 486 | int busy = 0; |
487 | 487 | ||
488 | next = head->next; | 488 | list_for_each_entry_safe(inode, next, head, i_sb_list) { |
489 | for (;;) { | ||
490 | struct list_head *tmp = next; | ||
491 | struct inode *inode; | ||
492 | |||
493 | /* | ||
494 | * We can reschedule here without worrying about the list's | ||
495 | * consistency because the per-sb list of inodes must not | ||
496 | * change during umount anymore, and because iprune_sem keeps | ||
497 | * shrink_icache_memory() away. | ||
498 | */ | ||
499 | cond_resched_lock(&inode_lock); | ||
500 | |||
501 | next = next->next; | ||
502 | if (tmp == head) | ||
503 | break; | ||
504 | inode = list_entry(tmp, struct inode, i_sb_list); | ||
505 | if (inode->i_state & I_NEW) | 489 | if (inode->i_state & I_NEW) |
506 | continue; | 490 | continue; |
507 | if (atomic_read(&inode->i_count)) { | 491 | if (atomic_read(&inode->i_count)) { |