Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 88740
Collapse All | Expand All

(-)1.22/fs/sysfs/file.c (-6 / +7 lines)
Lines 231-245 Link Here
231
sysfs_write_file(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
231
sysfs_write_file(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
232
{
232
{
233
	struct sysfs_buffer * buffer = file->private_data;
233
	struct sysfs_buffer * buffer = file->private_data;
234
	ssize_t len;
234
235
235
	down(&buffer->sem);
236
	down(&buffer->sem);
236
	count = fill_write_buffer(buffer,buf,count);
237
	len = fill_write_buffer(buffer, buf, count);
237
	if (count > 0)
238
	if (len > 0)
238
		count = flush_write_buffer(file->f_dentry,buffer,count);
239
		len = flush_write_buffer(file->f_dentry, buffer, len);
239
	if (count > 0)
240
	if (len > 0)
240
		*ppos += count;
241
		*ppos += len;
241
	up(&buffer->sem);
242
	up(&buffer->sem);
242
	return count;
243
	return len;
243
}
244
}
244
245
245
static int check_perm(struct inode * inode, struct file * file)
246
static int check_perm(struct inode * inode, struct file * file)

Return to bug 88740