summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/file.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-01 19:39:03 -0400
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-09 16:28:41 -0400
commit2294f9b8793d02b265423207e55ce5b26d8960cd (patch)
treea74a8a0badfc2c93384ef8a597b68ad974425e53 /fs/jffs2/file.c
parent7e0a126519b82648b254afcd95a168c15f65ea40 (diff)
downloadlinux-stable-2294f9b8793d02b265423207e55ce5b26d8960cd.tar.gz
linux-stable-2294f9b8793d02b265423207e55ce5b26d8960cd.tar.bz2
linux-stable-2294f9b8793d02b265423207e55ce5b26d8960cd.zip
jffs2: Pass the file pointer to jffs2_do_readpage_unlock()
In preparation for unifying the read_cache_page() and read_folio() implementations, make jffs2_do_readpage_unlock() get the inode from the page instead of passing it in from read_cache_page(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/jffs2/file.c')
-rw-r--r--fs/jffs2/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c
index f8616683fbee..492fb2da0403 100644
--- a/fs/jffs2/file.c
+++ b/fs/jffs2/file.c
@@ -112,7 +112,7 @@ static int jffs2_do_readpage_nolock (struct inode *inode, struct page *pg)
int jffs2_do_readpage_unlock(void *data, struct page *pg)
{
- int ret = jffs2_do_readpage_nolock(data, pg);
+ int ret = jffs2_do_readpage_nolock(pg->mapping->host, pg);
unlock_page(pg);
return ret;
}
@@ -124,7 +124,7 @@ static int jffs2_read_folio(struct file *file, struct folio *folio)
int ret;
mutex_lock(&f->sem);
- ret = jffs2_do_readpage_unlock(folio->mapping->host, &folio->page);
+ ret = jffs2_do_readpage_unlock(file, &folio->page);
mutex_unlock(&f->sem);
return ret;
}