Commit 6a4ef481 authored by Yehuda Sadeh's avatar Yehuda Sadeh Committed by Sage Weil

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: default avatarYehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 93cea5be
...@@ -350,10 +350,10 @@ static int copy_user_to_page_vector(struct page **pages, ...@@ -350,10 +350,10 @@ static int copy_user_to_page_vector(struct page **pages,
return -EFAULT; return -EFAULT;
data += l - bad; data += l - bad;
left -= l - bad; left -= l - bad;
if (po) {
po += l - bad; po += l - bad;
if (po == PAGE_CACHE_SIZE) if (po == PAGE_CACHE_SIZE) {
po = 0; po = 0;
i++;
} }
} }
return len; return len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment