Commit 01af106
btrfs: fix two misuses of folio_shift()
It is meaningless to shift a byte count by folio_shift(). The folio index
is in units of PAGE_SIZE, not folio_size(). We can use folio_contains()
to make this work for arbitrary-order folios, so remove the assertion
that the folios are of order 0.
Reviewed-by: Qu Wenruo <[email protected]>
Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>1 parent fdef89c commit 01af106
1 file changed
+5
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
526 | | - | |
527 | | - | |
528 | 526 | | |
529 | 527 | | |
530 | 528 | | |
| |||
552 | 550 | | |
553 | 551 | | |
554 | 552 | | |
555 | | - | |
556 | 553 | | |
557 | 554 | | |
558 | 555 | | |
| |||
561 | 558 | | |
562 | 559 | | |
563 | 560 | | |
564 | | - | |
| 561 | + | |
| 562 | + | |
565 | 563 | | |
566 | | - | |
| 564 | + | |
| 565 | + | |
567 | 566 | | |
568 | 567 | | |
569 | 568 | | |
| |||
956 | 955 | | |
957 | 956 | | |
958 | 957 | | |
959 | | - | |
| 958 | + | |
960 | 959 | | |
961 | 960 | | |
962 | 961 | | |
| |||
0 commit comments