summaryrefslogtreecommitdiff
path: root/fs/splice.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-02-13 06:48:55 +0300
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-03-21 19:59:01 +0300
commit5100da38ef3c33d9ad8b60b29c2b671249bf7e1d (patch)
treeeef4a39c6e56852c4cba81fe237adabb6e70213d /fs/splice.c
parente41c81d0d30e1a6ebf408feaf561f80cac4457dc (diff)
downloadlinux-5100da38ef3c33d9ad8b60b29c2b671249bf7e1d.tar.xz
mm: Convert remove_mapping() to take a folio
Add kernel-doc and return the number of pages removed in order to get the statistics right in __invalidate_mapping_pages(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
Diffstat (limited to 'fs/splice.c')
-rw-r--r--fs/splice.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/splice.c b/fs/splice.c
index 23ff9c303abc..047b79db8eb5 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -46,8 +46,7 @@
static bool page_cache_pipe_buf_try_steal(struct pipe_inode_info *pipe,
struct pipe_buffer *buf)
{
- struct page *page = buf->page;
- struct folio *folio = page_folio(page);
+ struct folio *folio = page_folio(buf->page);
struct address_space *mapping;
folio_lock(folio);
@@ -74,7 +73,7 @@ static bool page_cache_pipe_buf_try_steal(struct pipe_inode_info *pipe,
* If we succeeded in removing the mapping, set LRU flag
* and return good.
*/
- if (remove_mapping(mapping, page)) {
+ if (remove_mapping(mapping, folio)) {
buf->flags |= PIPE_BUF_FLAG_LRU;
return true;
}