/* Discard all of the inodes for a given superblock. If the discard fails because there are busy inodes then a non zero value is returned. If the discard is successful all the inodes have been discarded.  */
int invalidate_inodes(struct super_block *sb)
/* Discard all of the inodes for a given superblock. If the discard fails because there are busy inodes then a non zero value is returned. If the discard is successful all the inodes have been discarded.  */
int invalidate_inodes(struct super_block *sb)
{
	int busy;
	LIST_HEAD(throw_away);
	down_write(&iprune_sem);
	spin_lock(&inode_lock);
	inotify_unmount_inodes(&sb->s_inodes);
	fsnotify_unmount_inodes(&sb->s_inodes);
	busy = invalidate_list(&sb->s_inodes, &throw_away);
	spin_unlock(&inode_lock);
	dispose_list(&throw_away);
	up_write(&iprune_sem);
	return busy;
}