Commit 184cee5
mm/highmem.c: fix zero_user_segments() with start > end
zero_user_segments() is used from __block_write_begin_int(), for example
like the following
zero_user_segments(page, 4096, 1024, 512, 918)
But new the zero_user_segments() implementation for for HIGHMEM +
TRANSPARENT_HUGEPAGE doesn't handle "start > end" case correctly, and hits
BUG_ON(). (we can fix __block_write_begin_int() instead though, it is the
old and multiple usage)
Also it calls kmap_atomic() unnecessarily while start == end == 0.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 0060ef3 ("mm: support THPs in zero_user_segments")
Signed-off-by: OGAWA Hirofumi <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>1 parent 4eae4ef commit 184cee5
1 file changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
371 | 376 | | |
372 | 377 | | |
373 | 378 | | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | 379 | | |
378 | 380 | | |
379 | 381 | | |
380 | 382 | | |
381 | 383 | | |
382 | 384 | | |
383 | | - | |
| 385 | + | |
| 386 | + | |
384 | 387 | | |
| 388 | + | |
385 | 389 | | |
386 | 390 | | |
387 | 391 | | |
| |||
392 | 396 | | |
393 | 397 | | |
394 | 398 | | |
395 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
396 | 402 | | |
| 403 | + | |
397 | 404 | | |
398 | 405 | | |
399 | 406 | | |
| |||
0 commit comments