|
Qu Wenruo |
1fc056 |
From 0932584b66e97aea91eb8c0b610e1d1083951b32 Mon Sep 17 00:00:00 2001
|
|
Qu Wenruo |
1fc056 |
From: David Sterba <dsterba@suse.com>
|
|
Qu Wenruo |
1fc056 |
Date: Fri, 23 Jun 2017 04:09:57 +0200
|
|
Qu Wenruo |
1fc056 |
Patch-mainline: v4.16
|
|
Qu Wenruo |
1fc056 |
Git-commit: 0932584b66e97aea91eb8c0b610e1d1083951b32
|
|
Qu Wenruo |
1fc056 |
References: bsc#1168273
|
|
Qu Wenruo |
1fc056 |
Subject: [PATCH 7/7] btrfs: sink get_extent parameter to extent_readpages
|
|
Qu Wenruo |
1fc056 |
|
|
Qu Wenruo |
1fc056 |
There's only one caller that passes btrfs_get_extent.
|
|
Qu Wenruo |
1fc056 |
|
|
Qu Wenruo |
1fc056 |
Signed-off-by: David Sterba <dsterba@suse.com>
|
|
Qu Wenruo |
1fc056 |
---
|
|
Qu Wenruo |
1fc056 |
fs/btrfs/extent_io.c | 11 +++++------
|
|
Qu Wenruo |
1fc056 |
fs/btrfs/extent_io.h | 3 +--
|
|
Qu Wenruo |
1fc056 |
fs/btrfs/inode.c | 3 +--
|
|
Qu Wenruo |
1fc056 |
3 files changed, 7 insertions(+), 10 deletions(-)
|
|
Qu Wenruo |
1fc056 |
|
|
Qu Wenruo |
1fc056 |
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
|
|
Qu Wenruo |
1fc056 |
index 3f5debc5e56f..f86a6aae545a 100644
|
|
Qu Wenruo |
1fc056 |
--- a/fs/btrfs/extent_io.c
|
|
Qu Wenruo |
1fc056 |
+++ b/fs/btrfs/extent_io.c
|
|
Qu Wenruo |
1fc056 |
@@ -4133,8 +4133,7 @@ int extent_writepages(struct extent_io_tree *tree,
|
|
Qu Wenruo |
1fc056 |
|
|
Qu Wenruo |
1fc056 |
int extent_readpages(struct extent_io_tree *tree,
|
|
Qu Wenruo |
1fc056 |
struct address_space *mapping,
|
|
Qu Wenruo |
1fc056 |
- struct list_head *pages, unsigned nr_pages,
|
|
Qu Wenruo |
1fc056 |
- get_extent_t get_extent)
|
|
Qu Wenruo |
1fc056 |
+ struct list_head *pages, unsigned nr_pages)
|
|
Qu Wenruo |
1fc056 |
{
|
|
Qu Wenruo |
1fc056 |
struct bio *bio = NULL;
|
|
Qu Wenruo |
1fc056 |
unsigned page_idx;
|
|
Qu Wenruo |
1fc056 |
@@ -4160,13 +4159,13 @@ int extent_readpages(struct extent_io_tree *tree,
|
|
Qu Wenruo |
1fc056 |
pagepool[nr++] = page;
|
|
Qu Wenruo |
1fc056 |
if (nr < ARRAY_SIZE(pagepool))
|
|
Qu Wenruo |
1fc056 |
continue;
|
|
Qu Wenruo |
1fc056 |
- __extent_readpages(tree, pagepool, nr, get_extent, &em_cached,
|
|
Qu Wenruo |
1fc056 |
- &bio, &bio_flags, &prev_em_start);
|
|
Qu Wenruo |
1fc056 |
+ __extent_readpages(tree, pagepool, nr, btrfs_get_extent,
|
|
Qu Wenruo |
1fc056 |
+ &em_cached, &bio, &bio_flags, &prev_em_start);
|
|
Qu Wenruo |
1fc056 |
nr = 0;
|
|
Qu Wenruo |
1fc056 |
}
|
|
Qu Wenruo |
1fc056 |
if (nr)
|
|
Qu Wenruo |
1fc056 |
- __extent_readpages(tree, pagepool, nr, get_extent, &em_cached,
|
|
Qu Wenruo |
1fc056 |
- &bio, &bio_flags, &prev_em_start);
|
|
Qu Wenruo |
1fc056 |
+ __extent_readpages(tree, pagepool, nr, btrfs_get_extent,
|
|
Qu Wenruo |
1fc056 |
+ &em_cached, &bio, &bio_flags, &prev_em_start);
|
|
Qu Wenruo |
1fc056 |
|
|
Qu Wenruo |
1fc056 |
if (em_cached)
|
|
Qu Wenruo |
1fc056 |
free_extent_map(em_cached);
|
|
Qu Wenruo |
1fc056 |
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
|
|
Qu Wenruo |
1fc056 |
index afc169d04b22..6cf4a0e5b0ea 100644
|
|
Qu Wenruo |
1fc056 |
--- a/fs/btrfs/extent_io.h
|
|
Qu Wenruo |
1fc056 |
+++ b/fs/btrfs/extent_io.h
|
|
Qu Wenruo |
1fc056 |
@@ -414,8 +414,7 @@ int btree_write_cache_pages(struct address_space *mapping,
|
|
Qu Wenruo |
1fc056 |
struct writeback_control *wbc);
|
|
Qu Wenruo |
1fc056 |
int extent_readpages(struct extent_io_tree *tree,
|
|
Qu Wenruo |
1fc056 |
struct address_space *mapping,
|
|
Qu Wenruo |
1fc056 |
- struct list_head *pages, unsigned nr_pages,
|
|
Qu Wenruo |
1fc056 |
- get_extent_t get_extent);
|
|
Qu Wenruo |
1fc056 |
+ struct list_head *pages, unsigned nr_pages);
|
|
Qu Wenruo |
1fc056 |
int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
|
|
Qu Wenruo |
1fc056 |
__u64 start, __u64 len);
|
|
Qu Wenruo |
1fc056 |
void set_page_extent_mapped(struct page *page);
|
|
Qu Wenruo |
1fc056 |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
|
|
Qu Wenruo |
1fc056 |
index 63cf6cd174d1..72c7b38fb17e 100644
|
|
Qu Wenruo |
1fc056 |
--- a/fs/btrfs/inode.c
|
|
Qu Wenruo |
1fc056 |
+++ b/fs/btrfs/inode.c
|
|
Qu Wenruo |
1fc056 |
@@ -8911,8 +8911,7 @@ btrfs_readpages(struct file *file, struct address_space *mapping,
|
|
Qu Wenruo |
1fc056 |
{
|
|
Qu Wenruo |
1fc056 |
struct extent_io_tree *tree;
|
|
Qu Wenruo |
1fc056 |
tree = &BTRFS_I(mapping->host)->io_tree;
|
|
Qu Wenruo |
1fc056 |
- return extent_readpages(tree, mapping, pages, nr_pages,
|
|
Qu Wenruo |
1fc056 |
- btrfs_get_extent);
|
|
Qu Wenruo |
1fc056 |
+ return extent_readpages(tree, mapping, pages, nr_pages);
|
|
Qu Wenruo |
1fc056 |
}
|
|
Qu Wenruo |
1fc056 |
static int __btrfs_releasepage(struct page *page, gfp_t gfp_flags)
|
|
Qu Wenruo |
1fc056 |
{
|
|
Qu Wenruo |
1fc056 |
--
|
|
Qu Wenruo |
1fc056 |
2.26.0
|
|
Qu Wenruo |
1fc056 |
|