Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'fuse-fixes-5.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse

Pull fuse fixes from Miklos Szeredi:
"A fix for a CUSE regression introduced in v4.20, as well as fixes for
a couple of old bugs"

* tag 'fuse-fixes-5.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
fuse: decrement NR_WRITEBACK_TEMP on the right page
fuse: call pipe_buf_release() under pipe lock
cuse: fix ioctl
fuse: handle zero sized retrieve correctly

+5 -3
+3 -1
fs/fuse/dev.c
··· 1742 1742 req->in.h.nodeid = outarg->nodeid; 1743 1743 req->in.numargs = 2; 1744 1744 req->in.argpages = 1; 1745 - req->page_descs[0].offset = offset; 1746 1745 req->end = fuse_retrieve_end; 1747 1746 1748 1747 index = outarg->offset >> PAGE_SHIFT; ··· 1756 1757 1757 1758 this_num = min_t(unsigned, num, PAGE_SIZE - offset); 1758 1759 req->pages[req->num_pages] = page; 1760 + req->page_descs[req->num_pages].offset = offset; 1759 1761 req->page_descs[req->num_pages].length = this_num; 1760 1762 req->num_pages++; 1761 1763 ··· 2077 2077 2078 2078 ret = fuse_dev_do_write(fud, &cs, len); 2079 2079 2080 + pipe_lock(pipe); 2080 2081 for (idx = 0; idx < nbuf; idx++) 2081 2082 pipe_buf_release(pipe, &bufs[idx]); 2083 + pipe_unlock(pipe); 2082 2084 2083 2085 out: 2084 2086 kvfree(bufs);
+1 -1
fs/fuse/file.c
··· 1782 1782 spin_unlock(&fc->lock); 1783 1783 1784 1784 dec_wb_stat(&bdi->wb, WB_WRITEBACK); 1785 - dec_node_page_state(page, NR_WRITEBACK_TEMP); 1785 + dec_node_page_state(new_req->pages[0], NR_WRITEBACK_TEMP); 1786 1786 wb_writeout_inc(&bdi->wb); 1787 1787 fuse_writepage_free(fc, new_req); 1788 1788 fuse_request_free(new_req);
+1 -1
fs/fuse/inode.c
··· 628 628 get_random_bytes(&fc->scramble_key, sizeof(fc->scramble_key)); 629 629 fc->pid_ns = get_pid_ns(task_active_pid_ns(current)); 630 630 fc->user_ns = get_user_ns(user_ns); 631 + fc->max_pages = FUSE_DEFAULT_MAX_PAGES_PER_REQ; 631 632 } 632 633 EXPORT_SYMBOL_GPL(fuse_conn_init); 633 634 ··· 1163 1162 fc->user_id = d.user_id; 1164 1163 fc->group_id = d.group_id; 1165 1164 fc->max_read = max_t(unsigned, 4096, d.max_read); 1166 - fc->max_pages = FUSE_DEFAULT_MAX_PAGES_PER_REQ; 1167 1165 1168 1166 /* Used by get_root_inode() */ 1169 1167 sb->s_fs_info = fc;