Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9407
b: refs/heads/master
c: 5134fc1
h: refs/heads/master
i:
  9405: 22883b3
  9403: 1204bf9
  9399: 3be2928
  9391: 278fdbe
  9375: fe6f4a2
  9343: 80a0db4
v: v3
  • Loading branch information
Paul Jackson authored and Linus Torvalds committed Sep 28, 2005
1 parent cd976a3 commit 351d741
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 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: 2dd3c1df95fb29e9227f16ccd7d786d129e2b34d
refs/heads/master: 5134fc15b643dc36eb9aa77e4318b886844a9ac5
11 changes: 6 additions & 5 deletions trunk/kernel/cpuset.c
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ static ssize_t cpuset_common_file_read(struct file *file, char __user *buf,
ssize_t retval = 0;
char *s;
char *start;
size_t n;
ssize_t n;

if (!(page = (char *)__get_free_page(GFP_KERNEL)))
return -ENOMEM;
Expand Down Expand Up @@ -999,12 +999,13 @@ static ssize_t cpuset_common_file_read(struct file *file, char __user *buf,
*s++ = '\n';
*s = '\0';

/* Do nothing if *ppos is at the eof or beyond the eof. */
if (s - page <= *ppos)
return 0;

start = page + *ppos;
n = s - start;

/* Do nothing if *ppos is at the eof or beyond the eof. */
if (n <= 0)
goto out;

retval = n - copy_to_user(buf, start, min(n, nbytes));
*ppos += retval;
out:
Expand Down

0 comments on commit 351d741

Please sign in to comment.