/* copy from fs while checksumming, otherwise like csum_partial  */
__wsum csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *csum_err)
/* copy from fs while checksumming, otherwise like csum_partial  */
__wsum csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *csum_err)
{
	int rem;
	if (csum_err)
		*csum_err = 0;
	rem = copy_from_user(dst, src, len);
	if (rem != 0) {
		if (csum_err)
			*csum_err = -EFAULT;
		memset(dst + len - rem, 0, rem);
		len = rem;
	}
	return csum_partial(dst, len, sum);
}