Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79655
b: refs/heads/master
c: a661b77
h: refs/heads/master
i:
  79653: 10b5b53
  79651: 82bf57a
  79647: ef5495a
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Jan 30, 2008
1 parent fcd8947 commit 9bc9b54
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 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: 369af0f1166f7a637751110395496cee156b4297
refs/heads/master: a661b77fc12a172edea4b709e37f8cd58a6bd500
14 changes: 6 additions & 8 deletions trunk/fs/nfs/idmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,17 +358,15 @@ idmap_pipe_upcall(struct file *filp, struct rpc_pipe_msg *msg,
char __user *dst, size_t buflen)
{
char *data = (char *)msg->data + msg->copied;
ssize_t mlen = msg->len - msg->copied;
ssize_t left;

if (mlen > buflen)
mlen = buflen;
size_t mlen = min(msg->len, buflen);
unsigned long left;

left = copy_to_user(dst, data, mlen);
if (left < 0) {
msg->errno = left;
return left;
if (left == mlen) {
msg->errno = -EFAULT;
return -EFAULT;
}

mlen -= left;
msg->copied += mlen;
msg->errno = 0;
Expand Down

0 comments on commit 9bc9b54

Please sign in to comment.