Skip to content

Commit 1465615

Browse files
Matthew Wilcox (Oracle)aalexandrovich
authored andcommitted
ntfs: Do not kmap pages used for reading from disk
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>
1 parent 801f614 commit 1465615

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

fs/ntfs3/frecord.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2590,7 +2590,6 @@ int ni_read_frame(struct ntfs_inode *ni, u64 frame_vbo, struct page **pages,
25902590
}
25912591
pages_disk[i] = pg;
25922592
lock_page(pg);
2593-
kmap(pg);
25942593
}
25952594

25962595
/* Read 'ondisk_size' bytes from disk. */
@@ -2640,7 +2639,6 @@ int ni_read_frame(struct ntfs_inode *ni, u64 frame_vbo, struct page **pages,
26402639
for (i = 0; i < npages_disk; i++) {
26412640
pg = pages_disk[i];
26422641
if (pg) {
2643-
kunmap(pg);
26442642
unlock_page(pg);
26452643
put_page(pg);
26462644
}
@@ -2735,7 +2733,6 @@ int ni_write_frame(struct ntfs_inode *ni, struct page **pages,
27352733
}
27362734
pages_disk[i] = pg;
27372735
lock_page(pg);
2738-
kmap(pg);
27392736
}
27402737

27412738
/* 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,
28232820
for (i = 0; i < pages_per_frame; i++) {
28242821
pg = pages_disk[i];
28252822
if (pg) {
2826-
kunmap(pg);
28272823
unlock_page(pg);
28282824
put_page(pg);
28292825
}

0 commit comments

Comments
 (0)