android_kernel_xiaomi_sm8350/fs/nfs
NeilBrown 14e6bab373 NFS: swap-out must always use STABLE writes.
[ Upstream commit c265de257f558a05c1859ee9e3fed04883b9ec0e ]

The commit handling code is not safe against memory-pressure deadlocks
when writing to swap.  In particular, nfs_commitdata_alloc() blocks
indefinitely waiting for memory, and this can consume all available
workqueue threads.

swap-out most likely uses STABLE writes anyway as COND_STABLE indicates
that a stable write should be used if the write fits in a single
request, and it normally does.  However if we ever swap with a small
wsize, or gather unusually large numbers of pages for a single write,
this might change.

For safety, make it explicit in the code that direct writes used for swap
must always use FLUSH_STABLE.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-15 14:18:36 +02:00
..
blocklayout
filelayout
flexfilelayout
cache_lib.c
cache_lib.h
callback_proc.c NFSv4/pNFS: Fix another issue with a list iterator pointing to the head 2022-04-15 14:18:21 +02:00
callback_xdr.c NFS: remove unneeded check in decode_devicenotify_args() 2022-04-15 14:18:19 +02:00
callback.c
callback.h NFSv4.1: Fix uninitialised variable in devicenotify 2022-02-16 12:52:48 +01:00
client.c NFS: Fix initialisation of nfs_client cl_flags field 2022-02-16 12:52:47 +01:00
delegation.c
delegation.h
dir.c NFS: LOOKUP_DIRECTORY is also ok with symlinks 2022-02-23 11:59:59 +01:00
direct.c NFS: swap-out must always use STABLE writes. 2022-04-15 14:18:36 +02:00
dns_resolve.c
dns_resolve.h
export.c
file.c NFS: swap IO handling is slightly different for O_DIRECT IO 2022-04-15 14:18:35 +02:00
fscache-index.c
fscache.c
fscache.h
getroot.c
inode.c NFS: Do not report writeback errors in nfs_getattr() 2022-02-23 11:59:59 +01:00
internal.h
io.c
iostat.h
Kconfig
Makefile
mount_clnt.c
namespace.c
netns.h
nfs2super.c
nfs2xdr.c NFS: Return valid errors from nfs2/3_decode_dirent() 2022-04-15 14:18:18 +02:00
nfs3_fs.h
nfs3acl.c
nfs3client.c
nfs3proc.c
nfs3super.c
nfs3xdr.c NFS: Return valid errors from nfs2/3_decode_dirent() 2022-04-15 14:18:18 +02:00
nfs4_fs.h NFSv4 expose nfs_parse_server_name function 2022-02-16 12:52:48 +01:00
nfs4client.c nfs: nfs4clinet: check the return value of kstrdup() 2022-02-16 12:52:48 +01:00
nfs4file.c
nfs4getroot.c
nfs4idmap.c
nfs4idmap.h
nfs4namespace.c NFSv4 expose nfs_parse_server_name function 2022-02-16 12:52:48 +01:00
nfs4proc.c NFSv4.1: don't retry BIND_CONN_TO_SESSION on session error 2022-04-15 14:18:20 +02:00
nfs4renewd.c
nfs4session.c
nfs4session.h
nfs4state.c NFSv4: Protect the state recovery thread against direct reclaim 2022-04-15 14:18:35 +02:00
nfs4super.c
nfs4sysctl.c
nfs4trace.c
nfs4trace.h
nfs4xdr.c NFSv4 remove zero number of fs_locations entries error check 2022-02-16 12:52:48 +01:00
nfs42.h
nfs42proc.c NFSv42: Fix pagecache invalidation after COPY/CLONE 2021-12-08 09:01:08 +01:00
nfs42xdr.c NFSv42: Don't fail clone() unless the OP_CLONE operation failed 2021-12-01 09:23:32 +01:00
nfs.h
nfsroot.c
nfstrace.c
nfstrace.h
pagelist.c
pnfs_dev.c
pnfs_nfs.c
pnfs.c NFSv4/pNFS: Fix another issue with a list iterator pointing to the head 2022-04-15 14:18:21 +02:00
pnfs.h NFSv4/pNFS: Fix another issue with a list iterator pointing to the head 2022-04-15 14:18:21 +02:00
proc.c
read.c
super.c
symlink.c
sysctl.c
sysfs.c
sysfs.h
unlink.c
write.c