]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ntfs: Do not kmap pages used for reading from disk
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 18 Jul 2025 19:53:56 +0000 (20:53 +0100)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Fri, 17 Oct 2025 14:45:34 +0000 (16:45 +0200)
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>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/frecord.c

index c1c2ddaeb1e71a269069feec06e70856aae97742..784291ae04e6be8905fe154799692c861e877892 100644 (file)
@@ -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 @@ out3:
        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 @@ out1:
        for (i = 0; i < pages_per_frame; i++) {
                pg = pages_disk[i];
                if (pg) {
-                       kunmap(pg);
                        unlock_page(pg);
                        put_page(pg);
                }