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@xxxxxxx> --- fs/udf/inode.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/fs/udf/inode.c b/fs/udf/inode.c index 7e3aca596bcf..66e491626d74 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c @@ -189,16 +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); - unlock_page(page); + memcpy_to_page(page, 0, iinfo->i_data + iinfo->i_lenEAttr, + i_size_read(inode)); mark_inode_dirty(inode); return 0; -- 2.35.3