| .. | .. |
|---|
| 79 | 79 | size_t n = min_t(size_t, count, |
|---|
| 80 | 80 | PAGE_SIZE - offset_in_page(pos)); |
|---|
| 81 | 81 | struct page *page; |
|---|
| 82 | | - void *fsdata; |
|---|
| 83 | | - void *addr; |
|---|
| 82 | + void *fsdata = NULL; |
|---|
| 84 | 83 | int res; |
|---|
| 85 | 84 | |
|---|
| 86 | 85 | res = pagecache_write_begin(NULL, inode->i_mapping, pos, n, 0, |
|---|
| .. | .. |
|---|
| 88 | 87 | if (res) |
|---|
| 89 | 88 | return res; |
|---|
| 90 | 89 | |
|---|
| 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); |
|---|
| 94 | 91 | |
|---|
| 95 | 92 | res = pagecache_write_end(NULL, inode->i_mapping, pos, n, n, |
|---|
| 96 | 93 | page, fsdata); |
|---|