]> www.infradead.org Git - users/jedix/linux-maple.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>
Tue, 6 Apr 2021 13:35:55 +0000 (15:35 +0200)
commita94f7d48a486173afb26e0e34dc11b5326c1b9d8
treee528a219639f57785103217c662dc5b8a98ab59c
parent90f99ce65f27996b873c3e11de3001e42a2e6c00
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