On Wed, Nov 14, 2018 at 02:35:18PM +0100, Johannes Thumshirn wrote:
> Commit 2922040236f9 (btrfs: Remove extent_io_ops::writepage_end_io_hook)
> removed the indirection to extent_io_ops::writepage_end_io_hook but didn't
> remove the tree variable which then became unused.
>
> Remove 'tree' as well to silence the warning when -Wunused-but-set-variable is
> used to compile btrfs.
The subject says bio_readpage_error() but this is
end_extent_writepage(). Otherwise,
Reviewed-by: Omar Sandoval <osandov@xxxxxx>
> Signed-off-by: Johannes Thumshirn <jthumshirn@xxxxxxx>
> ---
> fs/btrfs/extent_io.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
> index 0f8f9c035812..17a15cc6b542 100644
> --- a/fs/btrfs/extent_io.c
> +++ b/fs/btrfs/extent_io.c
> @@ -2403,11 +2403,8 @@ static int bio_readpage_error(struct bio *failed_bio, u64 phy_offset,
> void end_extent_writepage(struct page *page, int err, u64 start, u64 end)
> {
> int uptodate = (err == 0);
> - struct extent_io_tree *tree;
> int ret = 0;
>
> - tree = &BTRFS_I(page->mapping->host)->io_tree;
> -
> btrfs_writepage_endio_finish_ordered(page, start, end, NULL, uptodate);
>
> if (!uptodate) {
> --
> 2.16.4
>