diff options
Diffstat (limited to 'fs/ext4/verity.c')
-rw-r--r-- | fs/ext4/verity.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/ext4/verity.c b/fs/ext4/verity.c index 6a30e54c1128..9879ea046e5a 100644 --- a/fs/ext4/verity.c +++ b/fs/ext4/verity.c @@ -79,8 +79,7 @@ static int pagecache_write(struct inode *inode, const void *buf, size_t count, size_t n = min_t(size_t, count, PAGE_SIZE - offset_in_page(pos)); struct page *page; - void *fsdata; - void *addr; + void *fsdata = NULL; int res; res = pagecache_write_begin(NULL, inode->i_mapping, pos, n, 0, @@ -88,9 +87,7 @@ static int pagecache_write(struct inode *inode, const void *buf, size_t count, if (res) return res; - addr = kmap_atomic(page); - memcpy(addr + offset_in_page(pos), buf, n); - kunmap_atomic(addr); + memcpy_to_page(page, offset_in_page(pos), buf, n); res = pagecache_write_end(NULL, inode->i_mapping, pos, n, n, page, fsdata); |