Skip to content

Commit

Permalink
ceph: fix copy_user_to_page_vector()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yehuda Sadeh authored and Sage Weil committed Jan 7, 2010
1 parent 93cea5b commit 6a4ef48
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fs/ceph/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6a4ef48

Please sign in to comment.