Commit 6ef4e2e
iomap: move folio_unlock out of iomap_writeback_folio
Move unlocking the folio out of iomap_writeback_folio into the caller.
This means the end writeback machinery is now run with the folio locked
when no writeback happened, or writeback completed extremely fast.
Note that having the folio locked over the call to folio_end_writeback in
iomap_writeback_folio means that the dropbehind handling there will never
run because the trylock fails. The only way this can happen is if the
writepage either never wrote back any dirty data at all, in which case
the dropbehind handling isn't needed, or if all writeback finished
instantly, which is rather unlikely. Even in the latter case the
dropbehind handling is an optional optimization so skipping it will not
cause correctness issues.
This prepares for exporting iomap_writeback_folio for use in folio
laundering.
Signed-off-by: Joanne Koong <[email protected]>
[hch: split from a larger patch]
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: "Darrick J. Wong" <[email protected]>1 parent 03922c5 commit 6ef4e2e
1 file changed
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1652 | 1652 | | |
1653 | 1653 | | |
1654 | 1654 | | |
1655 | | - | |
1656 | | - | |
| 1655 | + | |
1657 | 1656 | | |
1658 | | - | |
1659 | 1657 | | |
1660 | 1658 | | |
1661 | 1659 | | |
| |||
1709 | 1707 | | |
1710 | 1708 | | |
1711 | 1709 | | |
1712 | | - | |
1713 | 1710 | | |
1714 | 1711 | | |
1715 | 1712 | | |
| |||
1736 | 1733 | | |
1737 | 1734 | | |
1738 | 1735 | | |
1739 | | - | |
| 1736 | + | |
1740 | 1737 | | |
| 1738 | + | |
| 1739 | + | |
1741 | 1740 | | |
1742 | 1741 | | |
1743 | 1742 | | |
| |||
0 commit comments