|
@@ -1512,7 +1512,7 @@ static int fuse_retrieve(struct fuse_conn *fc, struct inode *inode,
|
|
|
else if (outarg->offset + num > file_size)
|
|
|
num = file_size - outarg->offset;
|
|
|
|
|
|
- while (num) {
|
|
|
+ while (num && req->num_pages < FUSE_MAX_PAGES_PER_REQ) {
|
|
|
struct page *page;
|
|
|
unsigned int this_num;
|
|
|
|
|
@@ -1526,6 +1526,7 @@ static int fuse_retrieve(struct fuse_conn *fc, struct inode *inode,
|
|
|
|
|
|
num -= this_num;
|
|
|
total_len += this_num;
|
|
|
+ index++;
|
|
|
}
|
|
|
req->misc.retrieve_in.offset = outarg->offset;
|
|
|
req->misc.retrieve_in.size = total_len;
|