OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5c9a0b
)
ceph: pass proper page offset to copy_page_to_iter()
author
Yan, Zheng
<zheng.z.yan@intel.com>
Wed, 2 Jul 2014 02:13:00 +0000
(10:13 +0800)
committer
Ilya Dryomov
<ilya.dryomov@inktank.com>
Tue, 8 Jul 2014 11:08:47 +0000
(15:08 +0400)
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
fs/ceph/file.c
patch
|
blob
|
history
diff --git
a/fs/ceph/file.c
b/fs/ceph/file.c
index
19af25d
..
fec9ddc
100644
(file)
--- a/
fs/ceph/file.c
+++ b/
fs/ceph/file.c
@@
-470,8
+470,11
@@
static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *i,
size_t left = ret;
while (left) {
- int copy = min_t(size_t, PAGE_SIZE, left);
- l = copy_page_to_iter(pages[k++], 0, copy, i);
+ size_t page_off = off & ~PAGE_MASK;
+ size_t copy = min_t(size_t,
+ PAGE_SIZE - page_off, left);
+ l = copy_page_to_iter(pages[k++], page_off,
+ copy, i);
off += l;
left -= l;
if (l < copy)