/* We now support a flag for forced unmount like the other 'big iron' unixes. Our API is identical to OSF/1 to avoid making a mess of AMD  */
SYSCALL_DEFINE2(umount, char __user *, name, int, flags)
/* We now support a flag for forced unmount like the other 'big iron' unixes. Our API is identical to OSF/1 to avoid making a mess of AMD  */
SYSCALL_DEFINE2(umount, char __user *, name, int, flags)
{
	struct path path;
	int retval;
	retval = user_path(name, &path);
	if (retval)
		goto out;
	retval = -EINVAL;
	if (path.dentry != path.mnt->mnt_root)
		goto dput_and_out;
	if (!check_mnt(path.mnt))
		goto dput_and_out;
	retval = -EPERM;
	if (!capable(CAP_SYS_ADMIN))
		goto dput_and_out;
	retval = do_umount(path.mnt, flags);
dput_and_out:
	dput(path.dentry);
	mntput_no_expire(path.mnt);
out:
	return retval;
}