[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190502130405.GA2679@lst.de>
Date: Thu, 2 May 2019 15:04:05 +0200
From: Christoph Hellwig <hch@....de>
To: William Kucharski <william.kucharski@...cle.com>
Cc: Christoph Hellwig <hch@....de>,
Andrew Morton <akpm@...ux-foundation.org>,
Sami Tolvanen <samitolvanen@...gle.com>,
Kees Cook <keescook@...omium.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
linux-mtd@...ts.infradead.org, linux-nfs@...r.kernel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/4] 9p: pass the correct prototype to read_cache_page
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:
- v9fs_vfs_readpage passes filp->private_data
- v9fs_vfs_readpages passes filp->private_data through
read_cache_pages
- v9fs_write_begin passes the local fid variable
>
> 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 v9fs_vfs_readpage(struct file *filp, struct page *page)
> {
> return v9fs_fid_readpage(filp->private_data, page);
> }
Except that we don't pass v9fs_vfs_readpage as the filler any more,
we now pass v9fs_fid_readpage.
Powered by blists - more mailing lists