]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: integrity-checker: convert block context kmap's to kmap_local_page
authorIra Weiny <ira.weiny@intel.com>
Wed, 17 Feb 2021 02:48:26 +0000 (18:48 -0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Apr 2021 15:25:16 +0000 (17:25 +0200)
commitff95c206ed347ab2dc9a52d2e10411cbd07c69a5
tree986a63d584cc02dc61dbf6c17692a7d8d9f59cef
parent191fde46a681dcd05d2205ffe277b4a85893ad0f
btrfs: integrity-checker: convert block context kmap's to kmap_local_page

btrfsic_read_block() (which calls kmap()) and
btrfsic_release_block_ctx() (which calls kunmap()) are always called
within a single thread of execution.

Therefore the mappings created within these calls can be a thread local
mapping.

Convert the kmap() of bloc_ctx->pagev to kmap_local_page().  Luckily the
unmap loops backwards through the array pointer so no adjustment needs
to be made to the unmapping order.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/check-integrity.c