diff options
author | Al Viro | 2017-04-13 03:10:18 -0400 |
---|---|---|
committer | Al Viro | 2017-04-17 14:23:20 -0400 |
commit | 890559e34eac1fb90a4b5916d4a1387376a05d51 (patch) | |
tree | bc13690fd3d6c481a05ca416a92710b0816f64ec /fs/orangefs | |
parent | 4f7d029b9bf009fbee76bb10c0c4351a1870d2f3 (diff) |
orangefs_bufmap_copy_from_iovec(): fix EFAULT handling
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>
Diffstat (limited to 'fs/orangefs')
-rw-r--r-- | fs/orangefs/orangefs-bufmap.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/orangefs/orangefs-bufmap.c b/fs/orangefs/orangefs-bufmap.c index 6333cbbdfef7..83b506020718 100644 --- 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; - } /* |