/* This function is called when the vfs is freeing the superblock. We just need to free our own part.  */
static void exofs_put_super(struct super_block *sb)
/* This function is called when the vfs is freeing the superblock. We just need to free our own part.  */
static void exofs_put_super(struct super_block *sb)
{
	int num_pend;
	struct exofs_sb_info *sbi = sb->s_fs_info;
	if (sb->s_dirt)
		exofs_write_super(sb);
	for (num_pend = atomic_read(&sbi->s_curr_pending); num_pend > 0;
	     num_pend = atomic_read(&sbi->s_curr_pending)) {
		wait_queue_head_t wq;
		init_waitqueue_head(&wq);
		wait_event_timeout(wq,
				  (atomic_read(&sbi->s_curr_pending) == 0),
				  msecs_to_jiffies(100));
	}
	_exofs_print_device("Unmounting", NULL, sbi->s_ods[0], sbi->s_pid);
	exofs_free_sbi(sbi);
	sb->s_fs_info = NULL;
}