Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46923
b: refs/heads/master
c: ff05d1c
h: refs/heads/master
i:
  46921: b0bea3d
  46919: fd75b48
v: v3
  • Loading branch information
Joel Becker authored and Mark Fasheh committed Feb 7, 2007
1 parent b9ddfc1 commit c44b851
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b559292e066f6d570cd5aa5dbd41de61dd04bdce
refs/heads/master: ff05d1c4643dd4260eb699396043d7e8009c0de4
9 changes: 6 additions & 3 deletions trunk/fs/configfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,17 @@ fill_write_buffer(struct configfs_buffer * buffer, const char __user * buf, size
int error;

if (!buffer->page)
buffer->page = (char *)get_zeroed_page(GFP_KERNEL);
buffer->page = (char *)__get_free_pages(GFP_KERNEL, 0);
if (!buffer->page)
return -ENOMEM;

if (count > PAGE_SIZE)
count = PAGE_SIZE;
if (count >= PAGE_SIZE)
count = PAGE_SIZE - 1;
error = copy_from_user(buffer->page,buf,count);
buffer->needs_read_fill = 1;
/* if buf is assumed to contain a string, terminate it by \0,
* so e.g. sscanf() can scan the string easily */
buffer->page[count] = 0;
return error ? -EFAULT : count;
}

Expand Down

0 comments on commit c44b851

Please sign in to comment.