Commit 36ee131
committed
ntfs: use page allocation for resident attribute inline data
The current kmemdup() based allocation for IOMAP_INLINE can result in
inline_data pointer having a non-zero page offset. This causes
iomap_inline_data_valid() to fail the check:
iomap->length <= PAGE_SIZE - offset_in_page(iomap->inline_data)
and triggers the kernel BUG at fs/iomap/buffered-io.c:1061.
This particularly affects workloads with frequent small file access
(e.g. Firefox Nightly profile on NTFS with bind mount) when using the
new ntfs. This fix this by allocating a full page with alloc_page() so that
page_address() always returns a page-aligned address.
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>1 parent 6e0152c commit 36ee131
1 file changed
Lines changed: 19 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
132 | | - | |
133 | | - | |
| 133 | + | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
| 139 | + | |
138 | 140 | | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
| 144 | + | |
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| |||
285 | 289 | | |
286 | 290 | | |
287 | 291 | | |
288 | | - | |
289 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
290 | 297 | | |
291 | 298 | | |
292 | 299 | | |
| |||
652 | 659 | | |
653 | 660 | | |
654 | 661 | | |
| 662 | + | |
655 | 663 | | |
656 | 664 | | |
657 | 665 | | |
| |||
672 | 680 | | |
673 | 681 | | |
674 | 682 | | |
675 | | - | |
676 | | - | |
| 683 | + | |
| 684 | + | |
677 | 685 | | |
678 | 686 | | |
679 | 687 | | |
680 | 688 | | |
| 689 | + | |
681 | 690 | | |
| 691 | + | |
682 | 692 | | |
683 | 693 | | |
684 | 694 | | |
| 695 | + | |
685 | 696 | | |
686 | 697 | | |
687 | 698 | | |
| |||
771 | 782 | | |
772 | 783 | | |
773 | 784 | | |
| 785 | + | |
774 | 786 | | |
775 | 787 | | |
776 | 788 | | |
| |||
799 | 811 | | |
800 | 812 | | |
801 | 813 | | |
802 | | - | |
| 814 | + | |
803 | 815 | | |
804 | 816 | | |
805 | 817 | | |
| |||
0 commit comments