iomap: move the PF_MEMALLOC check to iomap_writepages
authorChristoph Hellwig <hch@lst.de>
Thu, 7 Dec 2023 07:27:00 +0000 (08:27 +0100)
committerChristian Brauner <brauner@kernel.org>
Thu, 1 Feb 2024 13:20:11 +0000 (14:20 +0100)
commitc2dc7e5589a19cff8147f27d4beef7fc0aec2f86
treeb3bdcae881bba94c6ee0ffea706534bcc05b2323
parent432acd550e3607d5fea23e27f6ab4e4567deccfd
iomap: move the PF_MEMALLOC check to iomap_writepages

The iomap writepage implementation has been removed in commit
478af190cb6c ("iomap: remove iomap_writepage") and this code is now only
called through ->writepages which never happens from memory reclaim.

Nove the check from iomap_do_writepage to iomap_writepages so that is
only called once per ->writepage invocation.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20231207072710.176093-5-hch@lst.de
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/iomap/buffered-io.c