diff options
author | David Sterba <dsterba@suse.com> | 2016-05-04 05:46:10 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-05-06 08:57:57 -0400 |
commit | 58409edd2d5cc24716cb9ce690803696c5118503 (patch) | |
tree | ea605dcc992dea3d662abb8e72cd0c0ca6a6e6ad | |
parent | ad8403df054c9b5dc3175a26c6179571b9cafa4e (diff) |
btrfs: kill unused writepage_io_hook callback
It seems to be long time unused, since 2008 and
6885f308b5570 ("Btrfs: Misc 2.6.25 updates").
Propagating the removal touches some code but has no functional effect.
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/extent_io.c | 39 | ||||
-rw-r--r-- | fs/btrfs/extent_io.h | 1 |
2 files changed, 16 insertions, 24 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index d247fc0eea19..d22b0777c7e0 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -3368,6 +3368,8 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode, | |||
3368 | 3368 | ||
3369 | while (cur <= end) { | 3369 | while (cur <= end) { |
3370 | u64 em_end; | 3370 | u64 em_end; |
3371 | unsigned long max_nr; | ||
3372 | |||
3371 | if (cur >= i_size) { | 3373 | if (cur >= i_size) { |
3372 | if (tree->ops && tree->ops->writepage_end_io_hook) | 3374 | if (tree->ops && tree->ops->writepage_end_io_hook) |
3373 | tree->ops->writepage_end_io_hook(page, cur, | 3375 | tree->ops->writepage_end_io_hook(page, cur, |
@@ -3423,32 +3425,23 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode, | |||
3423 | continue; | 3425 | continue; |
3424 | } | 3426 | } |
3425 | 3427 | ||
3426 | if (tree->ops && tree->ops->writepage_io_hook) { | 3428 | max_nr = (i_size >> PAGE_SHIFT) + 1; |
3427 | ret = tree->ops->writepage_io_hook(page, cur, | 3429 | |
3428 | cur + iosize - 1); | 3430 | set_range_writeback(tree, cur, cur + iosize - 1); |
3429 | } else { | 3431 | if (!PageWriteback(page)) { |
3430 | ret = 0; | 3432 | btrfs_err(BTRFS_I(inode)->root->fs_info, |
3433 | "page %lu not writeback, cur %llu end %llu", | ||
3434 | page->index, cur, end); | ||
3431 | } | 3435 | } |
3432 | if (ret) { | ||
3433 | SetPageError(page); | ||
3434 | } else { | ||
3435 | unsigned long max_nr = (i_size >> PAGE_SHIFT) + 1; | ||
3436 | 3436 | ||
3437 | set_range_writeback(tree, cur, cur + iosize - 1); | 3437 | ret = submit_extent_page(write_flags, tree, wbc, page, |
3438 | if (!PageWriteback(page)) { | 3438 | sector, iosize, pg_offset, |
3439 | btrfs_err(BTRFS_I(inode)->root->fs_info, | 3439 | bdev, &epd->bio, max_nr, |
3440 | "page %lu not writeback, cur %llu end %llu", | 3440 | end_bio_extent_writepage, |
3441 | page->index, cur, end); | 3441 | 0, 0, 0, false); |
3442 | } | 3442 | if (ret) |
3443 | SetPageError(page); | ||
3443 | 3444 | ||
3444 | ret = submit_extent_page(write_flags, tree, wbc, page, | ||
3445 | sector, iosize, pg_offset, | ||
3446 | bdev, &epd->bio, max_nr, | ||
3447 | end_bio_extent_writepage, | ||
3448 | 0, 0, 0, false); | ||
3449 | if (ret) | ||
3450 | SetPageError(page); | ||
3451 | } | ||
3452 | cur = cur + iosize; | 3445 | cur = cur + iosize; |
3453 | pg_offset += iosize; | 3446 | pg_offset += iosize; |
3454 | nr++; | 3447 | nr++; |
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index b5e0ade90e88..981f402bf754 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h | |||
@@ -71,7 +71,6 @@ struct extent_io_ops { | |||
71 | u64 start, u64 end, int *page_started, | 71 | u64 start, u64 end, int *page_started, |
72 | unsigned long *nr_written); | 72 | unsigned long *nr_written); |
73 | int (*writepage_start_hook)(struct page *page, u64 start, u64 end); | 73 | int (*writepage_start_hook)(struct page *page, u64 start, u64 end); |
74 | int (*writepage_io_hook)(struct page *page, u64 start, u64 end); | ||
75 | extent_submit_bio_hook_t *submit_bio_hook; | 74 | extent_submit_bio_hook_t *submit_bio_hook; |
76 | int (*merge_bio_hook)(int rw, struct page *page, unsigned long offset, | 75 | int (*merge_bio_hook)(int rw, struct page *page, unsigned long offset, |
77 | size_t size, struct bio *bio, | 76 | size_t size, struct bio *bio, |