aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bitmap.c
diff options
context:
space:
mode:
authorIra Weiny <[email protected]>2021-03-29 06:54:02 +0000
committerJan Kara <[email protected]>2021-03-31 11:10:20 +0000
commit782b76d7abdf02b12c46ed6f1e9bf715569027f7 (patch)
treeff01e154cd08335de0da0f1cf8fae5262202f61c /lib/bitmap.c
parentext2: Match up ext2_put_page() with ext2_dotdot() and ext2_find_entry() (diff)
downloadkernel-782b76d7abdf02b12c46ed6f1e9bf715569027f7.tar.gz
kernel-782b76d7abdf02b12c46ed6f1e9bf715569027f7.zip
fs/ext2: Replace kmap() with kmap_local_page()
The k[un]map() calls in ext2_[get|put]_page() are localized to a single thread. kmap_local_page() is more efficient. Replace the kmap/kunmap calls with kmap_local_page()/kunmap_local(). kunmap_local() requires the mapping address so return that address from ext2_get_page() to be used in ext2_put_page(). This works well because many of the callers need the address anyway so it is not bad to return it along with the page. In addition, kmap_local_page()/kunmap_local() require strict nesting rules to be followed. Document the new nesting requirements of ext2_get_page() and ext2_put_page() as well as the relationship between ext2_get_page(), ext2_find_entry(), and ext2_dotdot(). Adjust one ext2_put_page() call site in ext2_rename() to ensure the new nesting requirements are met. Finally, adjust code style for checkpatch. To: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ira Weiny <[email protected]> Signed-off-by: Jan Kara <[email protected]>
Diffstat (limited to 'lib/bitmap.c')
0 files changed, 0 insertions, 0 deletions