From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
ntfs3@lists.linux.dev, linux-fsdevel@vger.kernel.org
Subject: [PATCH 1/3] ntfs: Do not kmap pages used for reading from disk
Date: Fri, 18 Jul 2025 20:53:56 +0100 [thread overview]
Message-ID: <20250718195400.1966070-2-willy@infradead.org> (raw)
In-Reply-To: <20250718195400.1966070-1-willy@infradead.org>
These pages are accessed through DMA and vmap; they are not accessed
by calling page_address(), so they do not need to be kmapped.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
fs/ntfs3/frecord.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c
index 37826288fbb0..c41968fcab00 100644
--- a/fs/ntfs3/frecord.c
+++ b/fs/ntfs3/frecord.c
@@ -2590,7 +2590,6 @@ int ni_read_frame(struct ntfs_inode *ni, u64 frame_vbo, struct page **pages,
}
pages_disk[i] = pg;
lock_page(pg);
- kmap(pg);
}
/* Read 'ondisk_size' bytes from disk. */
@@ -2640,7 +2639,6 @@ int ni_read_frame(struct ntfs_inode *ni, u64 frame_vbo, struct page **pages,
for (i = 0; i < npages_disk; i++) {
pg = pages_disk[i];
if (pg) {
- kunmap(pg);
unlock_page(pg);
put_page(pg);
}
@@ -2735,7 +2733,6 @@ int ni_write_frame(struct ntfs_inode *ni, struct page **pages,
}
pages_disk[i] = pg;
lock_page(pg);
- kmap(pg);
}
/* To simplify compress algorithm do vmap for source and target pages. */
@@ -2823,7 +2820,6 @@ int ni_write_frame(struct ntfs_inode *ni, struct page **pages,
for (i = 0; i < pages_per_frame; i++) {
pg = pages_disk[i];
if (pg) {
- kunmap(pg);
unlock_page(pg);
put_page(pg);
}
--
2.47.2
next prev parent reply other threads:[~2025-07-18 19:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-18 19:53 [PATCH 0/3] Compression fixes for ntfs3 Matthew Wilcox (Oracle)
2025-07-18 19:53 ` Matthew Wilcox (Oracle) [this message]
2025-07-18 19:53 ` [PATCH 2/3] ntfs: Do not kmap page cache pages for compression Matthew Wilcox (Oracle)
2025-07-18 19:53 ` [PATCH 3/3] ntfs: Do not overwrite uptodate pages Matthew Wilcox (Oracle)
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=20250718195400.1966070-2-willy@infradead.org \
--to=willy@infradead.org \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=ntfs3@lists.linux.dev \
/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;
as well as URLs for NNTP newsgroup(s).