diff options
| author | Benjamin Coddington <[email protected]> | 2025-07-10 01:47:43 +0000 |
|---|---|---|
| committer | Trond Myklebust <[email protected]> | 2025-07-28 16:01:21 +0000 |
| commit | 99765233ab42bf7a4950377ad7894dce8a5c0e60 (patch) | |
| tree | 713fbc3a6be72dc5fb1744935cc3a31ed5abb7d8 /net/unix/af_unix.c | |
| parent | NFSv4.2: another fix for listxattr (diff) | |
| download | kernel-99765233ab42bf7a4950377ad7894dce8a5c0e60.tar.gz kernel-99765233ab42bf7a4950377ad7894dce8a5c0e60.zip | |
NFS: Fixup allocation flags for nfsiod's __GFP_NORETRY
If the NFS client is doing writeback from a workqueue context, avoid using
__GFP_NORETRY for allocations if the task has set PF_MEMALLOC_NOIO or
PF_MEMALLOC_NOFS. The combination of these flags makes memory allocation
failures much more likely.
We've seen those allocation failures show up when the loopback driver is
doing writeback from a workqueue to a file on NFS, where memory allocation
failure results in errors or corruption within the loopback device's
filesystem.
Suggested-by: Trond Myklebust <[email protected]>
Fixes: 0bae835b63c5 ("NFS: Avoid writeback threads getting stuck in mempool_alloc()")
Signed-off-by: Benjamin Coddington <[email protected]>
Reviewed-by: Laurence Oberman <[email protected]>
Tested-by: Laurence Oberman <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Link: https://lore.kernel.org/r/f83ac1155a4bc670f2663959a7a068571e06afd9.1752111622.git.bcodding@redhat.com
Signed-off-by: Trond Myklebust <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
