From: Andrew Morton Cc: Nick Piggin Signed-off-by: Andrew Morton --- fs/fuse/file.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff -puN fs/fuse/file.c~fs-prepare_write-fixes-fuse-fix fs/fuse/file.c --- a/fs/fuse/file.c~fs-prepare_write-fixes-fuse-fix +++ a/fs/fuse/file.c @@ -454,14 +454,14 @@ static int fuse_prepare_write(struct fil } static int fuse_commit_write(struct file *file, struct page *page, - unsigned offset, unsigned to) + unsigned from, unsigned to) { int err; size_t nres; - unsigned count = to - offset; + unsigned count = to - from; struct inode *inode = page->mapping->host; struct fuse_conn *fc = get_fuse_conn(inode); - loff_t pos = page_offset(page) + offset; + loff_t pos = page_offset(page) + from; struct fuse_req *req; if (is_bad_inode(inode)) @@ -476,7 +476,7 @@ static int fuse_commit_write(struct file req->num_pages = 1; req->pages[0] = page; - req->page_offset = offset; + req->page_offset = from; nres = fuse_send_write(req, file, inode, pos, count); err = req->out.h.error; fuse_put_request(fc, req); @@ -489,7 +489,7 @@ static int fuse_commit_write(struct file i_size_write(inode, pos); spin_unlock(&fc->lock); - if (offset == 0 && to == PAGE_CACHE_SIZE) { + if (from == 0 && to == PAGE_CACHE_SIZE) { clear_page_dirty(page); SetPageUptodate(page); } _