/* Some copy_from_user() implementations do not return the exact number of bytes remaining to copy on a fault. But copy_mount_options() requires that. Note that this function differs from copy_from_user() in that it will oops on bad values of  */
static long exact_copy_from_user(void *to, const void __user *from, unsigned long n)
/* Some copy_from_user() implementations do not return the exact number of bytes remaining to copy on a fault. But copy_mount_options() requires that. Note that this function differs from copy_from_user() in that it will oops on bad values of  */
static long exact_copy_from_user(void *to, const void __user *from, unsigned long n)
{
	char *t = to;
	const char __user *f = from;
	char c;
	if (!access_ok(VERIFY_READ, from, n))
		return n;
	while (n) {
		if (__get_user(c, f)) {
			memset(t, 0, n);
			break;
		}
		*t++ = c;
		f++;
		n--;
	}
	return n;
}