1
0
Fork 0

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>
hifive-unleashed-5.1
Yehuda Sadeh 2009-12-31 12:04:58 -08:00 committed by Sage Weil
parent 93cea5bebf
commit 6a4ef48103
1 changed files with 4 additions and 4 deletions

View File

@ -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;