projects
/
platform
/
kernel
/
linux-rpi3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f7d029
)
orangefs_bufmap_copy_from_iovec(): fix EFAULT handling
author
Al Viro
<viro@zeniv.linux.org.uk>
Thu, 13 Apr 2017 07:10:18 +0000
(
03:10
-0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Mon, 17 Apr 2017 18:23:20 +0000
(14:23 -0400)
short copy here should mean instant EFAULT, not "move to the
next page and hope it fails there, this time with nothing
copied"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/orangefs/orangefs-bufmap.c
patch
|
blob
|
history
diff --git
a/fs/orangefs/orangefs-bufmap.c
b/fs/orangefs/orangefs-bufmap.c
index
6333cbb
..
83b5060
100644
(file)
--- a/
fs/orangefs/orangefs-bufmap.c
+++ b/
fs/orangefs/orangefs-bufmap.c
@@
-521,13
+521,11
@@
int orangefs_bufmap_copy_from_iovec(struct iov_iter *iter,
size_t n = size;
if (n > PAGE_SIZE)
n = PAGE_SIZE;
- n = copy_page_from_iter(page, 0, n, iter);
- if (!n)
+ if (copy_page_from_iter(page, 0, n, iter) != n)
return -EFAULT;
size -= n;
}
return 0;
-
}
/*