Re: [PATCH] netfs: fix ENOMEM handling in netfs_writepages() to drain all dirty folios

Christoph Hellwig <[email protected]> Wed, 22 Jul 2026 21:59:05 -0700
Newsgroups dev.linux.lists.netfs,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, Jul 07, 2026 at 01:25:55PM +0800, Yun Zhou wrote:
> When netfs_create_write_req() fails with -ENOMEM in netfs_writepages(),
> the couldnt_start error path redirties and unlocks the first folio,

writeback must use mempools to back resoures, or __GFP_NOFAIL if it
can't for some reason.  -ENOMEM must not happend in writeback paths
or your toast.  So please fix the cause of this error and not the
symptoms.