Re: [PATCH 5/4] 9p: pass the correct prototype to read_cache_page

2019-05-02 Thread William Kucharski
> On May 2, 2019, at 7:04 AM, Christoph Hellwig wrote: > > Except that we don't pass v9fs_vfs_readpage as the filler any more, > we now pass v9fs_fid_readpage. True, so never mind. :-)

Re: [PATCH 5/4] 9p: pass the correct prototype to read_cache_page

2019-05-02 Thread Christoph Hellwig
On Thu, May 02, 2019 at 12:08:29AM -0600, William Kucharski wrote: > 1) You need to pass "filp" rather than "filp->private_data" to > read_cache_pages() > in v9fs_fid_readpage(). With this patch v9fs_fid_readpage takes a void pointer that must be a FID, and we pass the FID everywhere: -

Re: [PATCH 5/4] 9p: pass the correct prototype to read_cache_page

2019-05-02 Thread Matthew Wilcox
On Thu, May 02, 2019 at 12:08:29AM -0600, William Kucharski wrote: > 3) Patch 5/4? That's a relatively common notation when an extra patch is needed to fix something after a series has been sent ;-)

Re: [PATCH 5/4] 9p: pass the correct prototype to read_cache_page

2019-05-02 Thread William Kucharski
1) You need to pass "filp" rather than "filp->private_data" to read_cache_pages() in v9fs_fid_readpage(). The patched code passes "filp->private_data" as the "data" parameter to read_cache_pages(), which would generate a call to: filler(data, page) which would become a call to: static int

[PATCH 5/4] 9p: pass the correct prototype to read_cache_page

2019-05-01 Thread Christoph Hellwig
Fix the callback 9p passes to read_cache_page to actually have the proper type expected. Casting around function pointers can easily hide typing bugs, and defeats control flow protection. Signed-off-by: Christoph Hellwig --- fs/9p/vfs_addr.c | 6 -- 1 file changed, 4 insertions(+), 2