Remove this open-coded call to kmap()/memset()/kunmap() with the higher-level abstraction folio_zero_range(). Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> --- fs/reiserfs/tail_conversion.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/reiserfs/tail_conversion.c b/fs/reiserfs/tail_conversion.c index a61bca73c45f..ca36bb88b8b0 100644 --- a/fs/reiserfs/tail_conversion.c +++ b/fs/reiserfs/tail_conversion.c @@ -151,11 +151,11 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode, * out the unused part of the block (it was not up to date before) */ if (up_to_date_bh) { - unsigned pgoff = - (tail_offset + total_tail - 1) & (PAGE_SIZE - 1); - char *kaddr = kmap_atomic(up_to_date_bh->b_page); - memset(kaddr + pgoff, 0, blk_size - total_tail); - kunmap_atomic(kaddr); + size_t start = offset_in_folio(up_to_date_bh->b_folio, + (tail_offset + total_tail - 1)); + + folio_zero_range(up_to_date_bh->b_folio, start, + blk_size - total_tail); } REISERFS_I(inode)->i_first_direct_byte = U32_MAX; -- 2.35.1