[PATCH 4/8] reiserfs: Convert reiserfs_delete_item() to use kmap_local_folio()

"Matthew Wilcox (Oracle)" <[email protected]>
Newsgroups gmane.comp.file-systems.reiserfs.general,gmane.linux.file-systems
Message-ID <[email protected]>
kmap_atomic() is deprecated, and so is bh->b_page.

Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
---
 fs/reiserfs/stree.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c
index 84c12a1947b2..309c61bd90e0 100644
--- a/fs/reiserfs/stree.c
+++ b/fs/reiserfs/stree.c
@@ -1359,12 +1359,13 @@ int reiserfs_delete_item(struct reiserfs_transaction_handle *th,
 		 * -clm
 		 */
 
-		data = kmap_atomic(un_bh->b_page);
-		off = ((le_ih_k_offset(&s_ih) - 1) & (PAGE_SIZE - 1));
-		memcpy(data + off,
+		off = offset_in_folio(un_bh->b_folio,
+					le_ih_k_offset(&s_ih) - 1);
+		data = kmap_local_folio(un_bh->b_folio, off);
+		memcpy(data,
 		       ih_item_body(PATH_PLAST_BUFFER(path), &s_ih),
 		       ret_value);
-		kunmap_atomic(data);
+		kunmap_local(data);
 	}
 
 	/* Perform balancing after all resources have been collected at once. */
-- 
2.35.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.