btrfs: use clear_page where appropriate

There's a helper to clear whole page, with a arch-specific optimized
code. The replaced cases do not seem to be in performace critical code,
but we still might get some percent gain.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba
2017-03-29 20:48:44 +02:00
parent e501bfe323
commit 619a974292
2 changed files with 2 additions and 2 deletions

View File

@@ -1643,7 +1643,7 @@ static int scrub_write_page_to_dev_replace(struct scrub_block *sblock,
if (spage->io_error) {
void *mapped_buffer = kmap_atomic(spage->page);
memset(mapped_buffer, 0, PAGE_SIZE);
clear_page(mapped_buffer);
flush_dcache_page(spage->page);
kunmap_atomic(mapped_buffer);
}