/* Note that with only one concurrent reader and one concurrent writer, you don't need extra locking to use these functions.  */
int kfifo_from_user(struct kfifo *fifo, const void __user *from, unsigned int len, unsigned *total)
/* Note that with only one concurrent reader and one concurrent writer, you don't need extra locking to use these functions.  */
int kfifo_from_user(struct kfifo *fifo, const void __user *from, unsigned int len, unsigned *total)
{
	int ret;
	len = min(kfifo_avail(fifo), len);
	ret = __kfifo_from_user_data(fifo, from, len, 0, total);
	if (ret)
		return ret;
	__kfifo_add_in(fifo, len);
	return 0;
}