linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: linux-fsdevel@vger.kernel.org
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	cluster-devel@redhat.com, linux-mtd@lists.infradead.org,
	linux-nfs@vger.kernel.org
Subject: [PATCH 2/3] nfs: Pass the file pointer to nfs_symlink_filler()
Date: Mon,  2 May 2022 06:41:58 +0100	[thread overview]
Message-ID: <20220502054159.3471078-3-willy@infradead.org> (raw)
In-Reply-To: <20220502054159.3471078-1-willy@infradead.org>

In preparation for unifying the read_cache_page() and read_folio()
implementations, make nfs_symlink_filler() get the inode
from the page instead of passing it in from read_cache_page().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/nfs/symlink.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/symlink.c b/fs/nfs/symlink.c
index 25ba299fdac2..8b53538bcc75 100644
--- a/fs/nfs/symlink.c
+++ b/fs/nfs/symlink.c
@@ -28,7 +28,7 @@
 
 static int nfs_symlink_filler(void *data, struct page *page)
 {
-	struct inode *inode = data;
+	struct inode *inode = page->mapping->host;
 	int error;
 
 	error = NFS_PROTO(inode)->readlink(inode, page, 0, PAGE_SIZE);
@@ -67,7 +67,7 @@ static const char *nfs_get_link(struct dentry *dentry,
 		if (err)
 			return err;
 		page = read_cache_page(&inode->i_data, 0, nfs_symlink_filler,
-				inode);
+				NULL);
 		if (IS_ERR(page))
 			return ERR_CAST(page);
 	}
-- 
2.34.1


  parent reply	other threads:[~2022-05-02  5:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02  5:41 [PATCH 0/3] Unify filler_t and read_folio Matthew Wilcox (Oracle)
2022-05-02  5:41 ` [PATCH 1/3] jffs2: Pass the file pointer to jffs2_do_readpage_unlock() Matthew Wilcox (Oracle)
2022-05-03 14:18   ` Christoph Hellwig
2022-05-02  5:41 ` Matthew Wilcox (Oracle) [this message]
2022-05-03 14:21   ` [PATCH 2/3] nfs: Pass the file pointer to nfs_symlink_filler() Christoph Hellwig
2022-05-02  5:41 ` [PATCH 3/3] fs: Change the type of filler_t Matthew Wilcox (Oracle)
2022-05-03 14:23   ` Christoph Hellwig
2022-05-08 19:06     ` Matthew Wilcox
2022-05-03 22:07   ` [Cluster-devel] " Andreas Gruenbacher

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=20220502054159.3471078-3-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=cluster-devel@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-nfs@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).