netfs: Fix a few minor bugs in netfs_page_mkwrite()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 5 Oct 2024 18:23:04 +0000 (19:23 +0100)
committerChristian Brauner <brauner@kernel.org>
Mon, 7 Oct 2024 11:45:15 +0000 (13:45 +0200)
commitc6a90fe7f080d71271b723490454cfda1f81e4b0
tree2bca0b3b2cbbb4767bbbde44cc61546520195cf6
parentfcd4904e2f6908d5c255fa5818bcf8ad32a6f0e8
netfs: Fix a few minor bugs in netfs_page_mkwrite()

We can't return with VM_FAULT_SIGBUS | VM_FAULT_LOCKED; the core
code will not unlock the folio in this instance.  Introduce a new
"unlock" error exit to handle this case.  Use it to handle
the "folio is truncated" check, and change the "writeback interrupted
by a fatal signal" to do a NOPAGE exit instead of letting the core
code install the folio currently under writeback before killing the
process.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: https://lore.kernel.org/r/20241005182307.3190401-3-willy@infradead.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/netfs/buffered_write.c