Commit 5cfc4532 authored by Jan Kara's avatar Jan Kara

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: default avatarJan Kara <jack@suse.cz>
parent 7b7f6865
...@@ -189,15 +189,11 @@ static int udf_adinicb_writepage(struct page *page, ...@@ -189,15 +189,11 @@ static int udf_adinicb_writepage(struct page *page,
struct writeback_control *wbc, void *data) struct writeback_control *wbc, void *data)
{ {
struct inode *inode = page->mapping->host; struct inode *inode = page->mapping->host;
char *kaddr;
struct udf_inode_info *iinfo = UDF_I(inode); struct udf_inode_info *iinfo = UDF_I(inode);
BUG_ON(!PageLocked(page)); BUG_ON(!PageLocked(page));
memcpy_to_page(page, 0, iinfo->i_data + iinfo->i_lenEAttr,
kaddr = kmap_atomic(page); i_size_read(inode));
memcpy(iinfo->i_data + iinfo->i_lenEAttr, kaddr, i_size_read(inode));
SetPageUptodate(page);
kunmap_atomic(kaddr);
unlock_page(page); unlock_page(page);
mark_inode_dirty(inode); mark_inode_dirty(inode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment