summaryrefslogtreecommitdiffstats
path: root/fs/ceph/file.c
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@hq.newdream.net>2009-12-31 12:04:58 -0800
committerSage Weil <sage@newdream.net>2010-01-06 16:05:20 -0800
commit6a4ef48103a78a46b80e07fcd8ac4edda0c7128f (patch)
treeb9cf0fcb4e83400b10e3e3940f274dd9724a2499 /fs/ceph/file.c
parent93cea5bebf91319095db866163a7e35c3e77d8f2 (diff)
downloadop-kernel-dev-6a4ef48103a78a46b80e07fcd8ac4edda0c7128f.zip
op-kernel-dev-6a4ef48103a78a46b80e07fcd8ac4edda0c7128f.tar.gz
ceph: fix copy_user_to_page_vector()
The function was broken in the case where there was more than one page involved, broke the ceph sync_write case. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r--fs/ceph/file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index fc8aff4..2d88c80 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -350,10 +350,10 @@ static int copy_user_to_page_vector(struct page **pages,
return -EFAULT;
data += l - bad;
left -= l - bad;
- if (po) {
- po += l - bad;
- if (po == PAGE_CACHE_SIZE)
- po = 0;
+ po += l - bad;
+ if (po == PAGE_CACHE_SIZE) {
+ po = 0;
+ i++;
}
}
return len;
OpenPOWER on IntegriCloud