hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/fs/ext4/verity.c
....@@ -79,8 +79,7 @@
7979 size_t n = min_t(size_t, count,
8080 PAGE_SIZE - offset_in_page(pos));
8181 struct page *page;
82
- void *fsdata;
83
- void *addr;
82
+ void *fsdata = NULL;
8483 int res;
8584
8685 res = pagecache_write_begin(NULL, inode->i_mapping, pos, n, 0,
....@@ -88,9 +87,7 @@
8887 if (res)
8988 return res;
9089
91
- addr = kmap_atomic(page);
92
- memcpy(addr + offset_in_page(pos), buf, n);
93
- kunmap_atomic(addr);
90
+ memcpy_to_page(page, offset_in_page(pos), buf, n);
9491
9592 res = pagecache_write_end(NULL, inode->i_mapping, pos, n, n,
9693 page, fsdata);