diff options
author | Heinz Mauelshagen <heinzm@redhat.com> | 2023-02-07 20:22:58 +0100 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2023-02-14 14:23:06 -0500 |
commit | 0d78954a2d80e648cfed1d306fffe52c6211c432 (patch) | |
tree | b3f9364a5e1e02d2daf75e636519cfa3d3938d3c /drivers/md/dm-log-writes.c | |
parent | 3bd940030752a33ff665eefdd74a1cdb74a4f9b0 (diff) |
dm: prefer kmap_local_page() instead of deprecated kmap_atomic()
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/dm-log-writes.c')
-rw-r--r-- | drivers/md/dm-log-writes.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/md/dm-log-writes.c b/drivers/md/dm-log-writes.c index 7c3b83536481..b126263f814c 100644 --- a/drivers/md/dm-log-writes.c +++ b/drivers/md/dm-log-writes.c @@ -232,13 +232,13 @@ static int write_metadata(struct log_writes_c *lc, void *entry, goto error; } - ptr = kmap_atomic(page); + ptr = kmap_local_page(page); memcpy(ptr, entry, entrylen); if (datalen) memcpy(ptr + entrylen, data, datalen); memset(ptr + entrylen + datalen, 0, lc->sectorsize - entrylen - datalen); - kunmap_atomic(ptr); + kunmap_local(ptr); ret = bio_add_page(bio, page, lc->sectorsize, 0); if (ret != lc->sectorsize) { @@ -287,11 +287,11 @@ static int write_inline_data(struct log_writes_c *lc, void *entry, goto error_bio; } - ptr = kmap_atomic(page); + ptr = kmap_local_page(page); memcpy(ptr, data, pg_datalen); if (pg_sectorlen > pg_datalen) memset(ptr + pg_datalen, 0, pg_sectorlen - pg_datalen); - kunmap_atomic(ptr); + kunmap_local(ptr); ret = bio_add_page(bio, page, pg_sectorlen, 0); if (ret != pg_sectorlen) { @@ -743,9 +743,9 @@ static int log_writes_map(struct dm_target *ti, struct bio *bio) return DM_MAPIO_KILL; } - dst = kmap_atomic(page); + dst = kmap_local_page(page); memcpy_from_bvec(dst, &bv); - kunmap_atomic(dst); + kunmap_local(dst); block->vecs[i].bv_page = page; block->vecs[i].bv_len = bv.bv_len; block->vec_cnt++; |