Linux NILFS development
 help / color / mirror / Atom feed
From: Ryusuke Konishi <konishi.ryusuke@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 02/15] nilfs2: convert segment buffer to use kmap_local
Date: Mon, 22 Jan 2024 23:01:49 +0900	[thread overview]
Message-ID: <20240122140202.6950-3-konishi.ryusuke@gmail.com> (raw)
In-Reply-To: <20240122140202.6950-1-konishi.ryusuke@gmail.com>

In the segment buffer code used for log writing, a CRC calculation
routine uses the deprecated kmap_atomic(), so convert it to use
kmap_local.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
---
 fs/nilfs2/segbuf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nilfs2/segbuf.c b/fs/nilfs2/segbuf.c
index 6e59dc19a732..dc431b4c34c9 100644
--- a/fs/nilfs2/segbuf.c
+++ b/fs/nilfs2/segbuf.c
@@ -220,9 +220,9 @@ static void nilfs_segbuf_fill_in_data_crc(struct nilfs_segment_buffer *segbuf,
 		crc = crc32_le(crc, bh->b_data, bh->b_size);
 	}
 	list_for_each_entry(bh, &segbuf->sb_payload_buffers, b_assoc_buffers) {
-		kaddr = kmap_atomic(bh->b_page);
+		kaddr = kmap_local_page(bh->b_page);
 		crc = crc32_le(crc, kaddr + bh_offset(bh), bh->b_size);
-		kunmap_atomic(kaddr);
+		kunmap_local(kaddr);
 	}
 	raw_sum->ss_datasum = cpu_to_le32(crc);
 }
-- 
2.34.1


  parent reply	other threads:[~2024-01-22 14:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-22 14:01 [PATCH 00/15] nilfs2: eliminate kmap and kmap_atomic calls Ryusuke Konishi
2024-01-22 14:01 ` [PATCH 01/15] nilfs2: convert recovery logic to use kmap_local Ryusuke Konishi
2024-01-22 14:01 ` Ryusuke Konishi [this message]
2024-01-22 14:01 ` [PATCH 03/15] nilfs2: convert nilfs_copy_buffer() " Ryusuke Konishi
2024-01-22 14:01 ` [PATCH 04/15] nilfs2: convert metadata file common code " Ryusuke Konishi
2024-01-22 14:01 ` [PATCH 05/15] nilfs2: convert sufile " Ryusuke Konishi
2024-01-22 14:01 ` [PATCH 06/15] nilfs2: convert persistent object allocator " Ryusuke Konishi
2024-01-22 14:01 ` [PATCH 07/15] nilfs2: convert DAT " Ryusuke Konishi
2024-01-22 14:01 ` [PATCH 08/15] nilfs2: move nilfs_bmap_write call out of nilfs_write_inode_common Ryusuke Konishi
2024-01-22 14:01 ` [PATCH 09/15] nilfs2: do not acquire rwsem in nilfs_bmap_write() Ryusuke Konishi
2024-01-22 14:01 ` [PATCH 10/15] nilfs2: convert ifile to use kmap_local Ryusuke Konishi
2024-01-22 14:01 ` [PATCH 11/15] nilfs2: localize highmem mapping for checkpoint creation within cpfile Ryusuke Konishi
2024-01-22 14:01 ` [PATCH 12/15] nilfs2: localize highmem mapping for checkpoint finalization " Ryusuke Konishi
2024-01-22 14:02 ` [PATCH 13/15] nilfs2: localize highmem mapping for checkpoint reading " Ryusuke Konishi
2024-01-22 14:02 ` [PATCH 14/15] nilfs2: remove nilfs_cpfile_{get,put}_checkpoint() Ryusuke Konishi
2024-01-22 14:02 ` [PATCH 15/15] nilfs2: convert cpfile to use kmap_local Ryusuke Konishi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240122140202.6950-3-konishi.ryusuke@gmail.com \
    --to=konishi.ryusuke@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nilfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox