udf: Convert udf_adinicb_writepage() to memcpy_to_page()

Instead of mapping the page manually with kmap() atomic, use helper
memcpy_to_page(). Also delete the pointless SetPageUptodate() call.

Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
Jan Kara 2023-01-25 10:23:33 +01:00
parent 7b7f68655f
commit 5cfc45321a

View File

@ -189,15 +189,11 @@ static int udf_adinicb_writepage(struct page *page,
struct writeback_control *wbc, void *data)
{
struct inode *inode = page->mapping->host;
char *kaddr;
struct udf_inode_info *iinfo = UDF_I(inode);
BUG_ON(!PageLocked(page));
kaddr = kmap_atomic(page);
memcpy(iinfo->i_data + iinfo->i_lenEAttr, kaddr, i_size_read(inode));
SetPageUptodate(page);
kunmap_atomic(kaddr);
memcpy_to_page(page, 0, iinfo->i_data + iinfo->i_lenEAttr,
i_size_read(inode));
unlock_page(page);
mark_inode_dirty(inode);