diff options
author | Joanne Koong <joannelkoong@gmail.com> | 2025-07-10 15:33:33 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-07-14 10:51:32 +0200 |
commit | f8b6a94a4ccafa95433798ad486c548c22624028 (patch) | |
tree | 6eb843f494ca1199ce096a7d552411717d47324e /lib/crypto/mpi/mpiutil.c | |
parent | 58f0d5a30427738118c19e195e9b8897e52afddb (diff) |
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 <joannelkoong@gmail.com>
[hch: split from a larger patch]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/20250710133343.399917-10-hch@lst.de
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'lib/crypto/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions