/* Allocate @buffer->page if it hasn't been already, then copy the user-supplied buffer into it.  */
static int fill_write_buffer(struct sysfs_buffer *buffer, const char __user *buf, size_t count)
/* Allocate @buffer->page if it hasn't been already, then copy the user-supplied buffer into it.  */
static int fill_write_buffer(struct sysfs_buffer *buffer, const char __user *buf, size_t count)
{
	int error;
	if (!buffer->page)
		buffer->page = (char *)get_zeroed_page(GFP_KERNEL);
	if (!buffer->page)
		return -ENOMEM;
	if (count >= PAGE_SIZE)
		count = PAGE_SIZE - 1;
	error = copy_from_user(buffer->page,buf,count);
	buffer->needs_read_fill = 1;
	buffer->page[count] = 0;
	return error ? -EFAULT : count;
}