/* Dispose-list gets a local list with local inodes in it, so it doesn't need to worry about list corruption and SMP locks.  */
static void dispose_list(struct list_head *head)
/* Dispose-list gets a local list with local inodes in it, so it doesn't need to worry about list corruption and SMP locks.  */
static void dispose_list(struct list_head *head)
{
	int nr_disposed = 0;
	while (!list_empty(head)) {
		struct inode *inode;
		inode = list_first_entry(head, struct inode, i_list);
		list_del(&inode->i_list);
		if (inode->i_data.nrpages)
			truncate_inode_pages(&inode->i_data, 0);
		clear_inode(inode);
		spin_lock(&inode_lock);
		hlist_del_init(&inode->i_hash);
		list_del_init(&inode->i_sb_list);
		spin_unlock(&inode_lock);
		wake_up_inode(inode);
		destroy_inode(inode);
		nr_disposed++;
	}
	spin_lock(&inode_lock);
	inodes_stat.nr_inodes -= nr_disposed;
	spin_unlock(&inode_lock);
}