diff options
author | Jan Kara <jack@suse.cz> | 2023-01-25 10:23:33 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2023-01-26 16:46:36 +0100 |
commit | 5cfc45321a6d81c2587b38f26187dbe0018c6b04 (patch) | |
tree | 57d08c99d6acdf4d59f8693759b0f04775c54077 /fs/udf | |
parent | udf: Switch udf_adinicb_readpage() to kmap_local_page() (diff) | |
download | linux-5cfc45321a6d81c2587b38f26187dbe0018c6b04.tar.xz linux-5cfc45321a6d81c2587b38f26187dbe0018c6b04.zip |
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>
Diffstat (limited to 'fs/udf')
-rw-r--r-- | fs/udf/inode.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index 72bca08d1fca..1d661faffde0 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c @@ -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); |