All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: William Kucharski <william.kucharski@oracle.com>
Cc: linux-nfs@vger.kernel.org, Kees Cook <keescook@chromium.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-mtd@lists.infradead.org,
	Sami Tolvanen <samitolvanen@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 5/4] 9p: pass the correct prototype to read_cache_page
Date: Thu, 2 May 2019 15:04:05 +0200	[thread overview]
Message-ID: <20190502130405.GA2679@lst.de> (raw)
In-Reply-To: <AEBFD2FC-F94A-4E5B-8E1C-76380DDEB46E@oracle.com>

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.

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: William Kucharski <william.kucharski@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Sami Tolvanen <samitolvanen@google.com>,
	Kees Cook <keescook@chromium.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	linux-mtd@lists.infradead.org, linux-nfs@vger.kernel.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/4] 9p: pass the correct prototype to read_cache_page
Date: Thu, 2 May 2019 15:04:05 +0200	[thread overview]
Message-ID: <20190502130405.GA2679@lst.de> (raw)
In-Reply-To: <AEBFD2FC-F94A-4E5B-8E1C-76380DDEB46E@oracle.com>

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.

  parent reply	other threads:[~2019-05-02 13:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-01 16:06 fix filler_t callback type mismatches Christoph Hellwig
2019-05-01 16:06 ` Christoph Hellwig
2019-05-01 16:06 ` [PATCH 1/4] mm: fix an overly long line in read_cache_page Christoph Hellwig
2019-05-01 16:06   ` Christoph Hellwig
2019-05-01 16:06 ` [PATCH 2/4] mm: don't cast ->readpage to filler_t for do_read_cache_page Christoph Hellwig
2019-05-01 16:06   ` Christoph Hellwig
2019-05-01 16:06 ` [PATCH 3/4] nfs: pass the correct prototype to read_cache_page Christoph Hellwig
2019-05-01 16:06   ` Christoph Hellwig
2019-05-01 16:06 ` [PATCH 4/4] jffs2: " Christoph Hellwig
2019-05-01 16:06   ` Christoph Hellwig
2019-05-01 17:00 ` fix filler_t callback type mismatches Sami Tolvanen
2019-05-01 17:00   ` Sami Tolvanen
2019-05-01 17:34 ` [PATCH 5/4] 9p: pass the correct prototype to read_cache_page Christoph Hellwig
2019-05-01 17:34   ` Christoph Hellwig
2019-05-02  6:08   ` William Kucharski
2019-05-02  6:08     ` William Kucharski
2019-05-02 10:20     ` Matthew Wilcox
2019-05-02 10:20       ` Matthew Wilcox
2019-05-02 13:04     ` Christoph Hellwig [this message]
2019-05-02 13:04       ` Christoph Hellwig
2019-05-02 14:01       ` William Kucharski
2019-05-02 14:01         ` William Kucharski
2019-05-01 18:25 ` fix filler_t callback type mismatches Kees Cook
2019-05-01 18:25   ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190502130405.GA2679@lst.de \
    --to=hch@lst.de \
    --cc=akpm@linux-foundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=samitolvanen@google.com \
    --cc=william.kucharski@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.