|
@@ -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)) {
|