diff options
author | Varun Wadekar <vwadekar@nvidia.com> | 2012-01-05 10:05:34 +0530 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2012-01-05 10:05:50 +0530 |
commit | 18b3e7967257168128dc3a16906de2880985ef6c (patch) | |
tree | d6efcb27791457c49fee449fb68e63e5a39a56d7 /fs/fuse | |
parent | 790716386f61bb982a3e47f4f7fc934dcfdcd511 (diff) | |
parent | 55cc81a8a48f6f78a5e1e164d179dd043f80cb5f (diff) |
Linux 3.1.7
Change-Id: I99507d7cfdcee064f808856dc2ce99d806fd864f
Diffstat (limited to 'fs/fuse')
-rw-r--r-- | fs/fuse/dev.c | 3 | ||||
-rw-r--r-- | fs/fuse/file.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index fb6fc9553312..c858b5c83209 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -1516,7 +1516,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; @@ -1530,6 +1530,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; diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 594f07a81c28..19029e97ca2f 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -1556,7 +1556,7 @@ static loff_t fuse_file_llseek(struct file *file, loff_t offset, int origin) struct inode *inode = file->f_path.dentry->d_inode; mutex_lock(&inode->i_mutex); - if (origin != SEEK_CUR || origin != SEEK_SET) { + if (origin != SEEK_CUR && origin != SEEK_SET) { retval = fuse_update_attributes(inode, NULL, file, NULL); if (retval) goto exit; |