Commit d48d71aa authored by David Sterba's avatar David Sterba

btrfs: remove redundant parameter from btree_readahead_hook

We can read fs_info from eb.
Reviewed-by: default avatarLiu Bo <bo.li.liu@oracle.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 7ef70b4d
...@@ -3672,8 +3672,7 @@ struct reada_control *btrfs_reada_add(struct btrfs_root *root, ...@@ -3672,8 +3672,7 @@ struct reada_control *btrfs_reada_add(struct btrfs_root *root,
struct btrfs_key *start, struct btrfs_key *end); struct btrfs_key *start, struct btrfs_key *end);
int btrfs_reada_wait(void *handle); int btrfs_reada_wait(void *handle);
void btrfs_reada_detach(void *handle); void btrfs_reada_detach(void *handle);
int btree_readahead_hook(struct btrfs_fs_info *fs_info, int btree_readahead_hook(struct extent_buffer *eb, int err);
struct extent_buffer *eb, int err);
static inline int is_fstree(u64 rootid) static inline int is_fstree(u64 rootid)
{ {
......
...@@ -762,7 +762,7 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio, ...@@ -762,7 +762,7 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
err: err:
if (reads_done && if (reads_done &&
test_and_clear_bit(EXTENT_BUFFER_READAHEAD, &eb->bflags)) test_and_clear_bit(EXTENT_BUFFER_READAHEAD, &eb->bflags))
btree_readahead_hook(fs_info, eb, ret); btree_readahead_hook(eb, ret);
if (ret) { if (ret) {
/* /*
...@@ -787,7 +787,7 @@ static int btree_io_failed_hook(struct page *page, int failed_mirror) ...@@ -787,7 +787,7 @@ static int btree_io_failed_hook(struct page *page, int failed_mirror)
eb->read_mirror = failed_mirror; eb->read_mirror = failed_mirror;
atomic_dec(&eb->io_pages); atomic_dec(&eb->io_pages);
if (test_and_clear_bit(EXTENT_BUFFER_READAHEAD, &eb->bflags)) if (test_and_clear_bit(EXTENT_BUFFER_READAHEAD, &eb->bflags))
btree_readahead_hook(eb->fs_info, eb, -EIO); btree_readahead_hook(eb, -EIO);
return -EIO; /* we fixed nothing */ return -EIO; /* we fixed nothing */
} }
......
...@@ -209,9 +209,9 @@ static void __readahead_hook(struct btrfs_fs_info *fs_info, ...@@ -209,9 +209,9 @@ static void __readahead_hook(struct btrfs_fs_info *fs_info,
return; return;
} }
int btree_readahead_hook(struct btrfs_fs_info *fs_info, int btree_readahead_hook(struct extent_buffer *eb, int err)
struct extent_buffer *eb, int err)
{ {
struct btrfs_fs_info *fs_info = eb->fs_info;
int ret = 0; int ret = 0;
struct reada_extent *re; struct reada_extent *re;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment