Skip to content

Commit

Permalink
btrfs: remove unused parameter from submit_extent_page
Browse files Browse the repository at this point in the history
This used to hold number of maximum pages to allocate, but this is now
limited by BIO_MAX_PAGES. The local are now unused and removed as well.

Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
David Sterba committed Feb 17, 2017
1 parent f1e3026 commit c2df8bb
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -2759,7 +2759,6 @@ static int submit_extent_page(int op, int op_flags, struct extent_io_tree *tree,
size_t size, unsigned long offset,
struct block_device *bdev,
struct bio **bio_ret,
unsigned long max_pages,
bio_end_io_t end_io_func,
int mirror_num,
unsigned long prev_bio_flags,
Expand Down Expand Up @@ -2925,7 +2924,6 @@ static int __do_readpage(struct extent_io_tree *tree,
}
}
while (cur <= end) {
unsigned long pnr = (last_byte >> PAGE_SHIFT) + 1;
bool force_bio_submit = false;

if (cur >= last_byte) {
Expand Down Expand Up @@ -3060,10 +3058,9 @@ static int __do_readpage(struct extent_io_tree *tree,
continue;
}

pnr -= page->index;
ret = submit_extent_page(REQ_OP_READ, read_flags, tree, NULL,
page, sector, disk_io_size, pg_offset,
bdev, bio, pnr,
bdev, bio,
end_bio_extent_readpage, mirror_num,
*bio_flags,
this_bio_flag,
Expand Down Expand Up @@ -3366,7 +3363,6 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode,

while (cur <= end) {
u64 em_end;
unsigned long max_nr;

if (cur >= i_size) {
if (tree->ops && tree->ops->writepage_end_io_hook)
Expand Down Expand Up @@ -3423,8 +3419,6 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode,
continue;
}

max_nr = (i_size >> PAGE_SHIFT) + 1;

set_range_writeback(tree, cur, cur + iosize - 1);
if (!PageWriteback(page)) {
btrfs_err(BTRFS_I(inode)->root->fs_info,
Expand All @@ -3434,7 +3428,7 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode,

ret = submit_extent_page(REQ_OP_WRITE, write_flags, tree, wbc,
page, sector, iosize, pg_offset,
bdev, &epd->bio, max_nr,
bdev, &epd->bio,
end_bio_extent_writepage,
0, 0, 0, false);
if (ret) {
Expand Down Expand Up @@ -3751,7 +3745,7 @@ static noinline_for_stack int write_one_eb(struct extent_buffer *eb,
set_page_writeback(p);
ret = submit_extent_page(REQ_OP_WRITE, write_flags, tree, wbc,
p, offset >> 9, PAGE_SIZE, 0, bdev,
&epd->bio, -1,
&epd->bio,
end_bio_extent_buffer_writepage,
0, epd->bio_flags, bio_flags, false);
epd->bio_flags = bio_flags;
Expand Down

0 comments on commit c2df8bb

Please sign in to comment.