/* This is called to check if a tree of mounts has any open files, pwds, chroots or sub mounts that are busy.  */
int may_umount_tree(struct vfsmount *mnt)
/* This is called to check if a tree of mounts has any open files, pwds, chroots or sub mounts that are busy.  */
int may_umount_tree(struct vfsmount *mnt)
{
	int actual_refs = 0;
	int minimum_refs = 0;
	struct vfsmount *p;
	spin_lock(&vfsmount_lock);
	for (p = mnt; p; p = next_mnt(p, mnt)) {
		actual_refs += atomic_read(&p->mnt_count);
		minimum_refs += 2;
	}
	spin_unlock(&vfsmount_lock);
	if (actual_refs > minimum_refs)
		return 0;
	return 1;
}