android_kernel_motorola_sm6225/fs/nfs
NeilBrown 194722a9e8 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:15:03 +02:00
..
blocklayout NFS: Mark expected switch fall-throughs 2018-08-08 16:50:02 -04:00
filelayout NFS: fix an incorrect limit in filelayout_decode_layout() 2021-06-03 08:38:08 +02:00
flexfilelayout pnfs/flexfiles: Fix misplaced barrier in nfs4_ff_layout_prepare_ds 2021-11-26 11:36:14 +01:00
cache_lib.c NFS client updates for Linux 4.15 2017-11-17 14:18:00 -08:00
cache_lib.h NFS client updates for Linux 4.15 2017-11-17 14:18:00 -08:00
callback.c NFS client updates for Linux 4.15 2017-11-17 14:18:00 -08:00
callback.h NFSv4.1: Fix uninitialised variable in devicenotify 2022-02-16 12:51:44 +01:00
callback_proc.c NFSv4/pNFS: Fix another issue with a list iterator pointing to the head 2022-04-15 14:14:53 +02:00
callback_xdr.c NFS: remove unneeded check in decode_devicenotify_args() 2022-04-15 14:14:52 +02:00
client.c NFS: Fix initialisation of nfs_client cl_flags field 2022-02-16 12:51:43 +01:00
delegation.c NFS: Fix a soft lockup in the delegation recovery code 2020-01-27 14:50:27 +01:00
delegation.h NFS: Fix a soft lockup in the delegation recovery code 2020-01-27 14:50:27 +01:00
dir.c NFS: LOOKUP_DIRECTORY is also ok with symlinks 2022-02-23 11:58:40 +01:00
direct.c NFS: swap-out must always use STABLE writes. 2022-04-15 14:15:03 +02:00
dns_resolve.c
dns_resolve.h
export.c NFS: Pass the inode down to the getattr() callback 2018-06-04 12:07:07 -04:00
file.c NFS: swap IO handling is slightly different for O_DIRECT IO 2022-04-15 14:15:03 +02:00
fscache-index.c nfs: fscache: use timespec64 in inode auxdata 2020-05-20 08:18:43 +02:00
fscache.c NFSv4: Fix fscache cookie aux_data to ensure change_attr is included 2020-05-20 08:18:43 +02:00
fscache.h nfs: fscache: use timespec64 in inode auxdata 2020-05-20 08:18:43 +02:00
getroot.c
inode.c NFS: Do not report writeback errors in nfs_getattr() 2022-02-23 11:58:40 +01:00
internal.h NFS: nfs_igrab_and_active must first reference the superblock 2021-01-19 18:22:37 +01:00
io.c NFS: Fix a race between mmap() and O_DIRECT 2018-01-28 22:00:15 -05:00
iostat.h
Kconfig nfs: fix PNFS_FLEXFILE_LAYOUT Kconfig default 2021-03-30 14:36:58 +02:00
Makefile
mount_clnt.c
namespace.c NFS: fix nfs_path in case of a rename retry 2020-11-05 11:08:46 +01:00
netns.h
nfs.h
nfs2super.c
nfs2xdr.c NFSv2: Fix a typo in encode_sattr() 2020-01-17 19:47:04 +01:00
nfs3_fs.h
nfs3acl.c nfs: Fix potential posix_acl refcnt leak in nfs3_set_acl 2020-05-06 08:13:32 +02:00
nfs3client.c
nfs3proc.c nfs: fix acl memory leak of posix_acl_create() 2021-07-20 16:16:13 +02:00
nfs3super.c
nfs3xdr.c NFS: Correct size calculation for create reply length 2021-03-30 14:36:58 +02:00
nfs4_fs.h NFSv4 expose nfs_parse_server_name function 2022-02-16 12:51:44 +01:00
nfs4client.c nfs: nfs4clinet: check the return value of kstrdup() 2022-02-16 12:51:44 +01:00
nfs4file.c NFSv4: Fix v4.0/v4.1 SEEK_DATA return -ENOTSUPP when set NFS_V4_2 config 2021-06-03 08:38:08 +02:00
nfs4getroot.c
nfs4idmap.c keys: Fix dependency loop between construction record and auth key 2019-03-23 20:09:48 +01:00
nfs4idmap.h
nfs4namespace.c NFSv4 expose nfs_parse_server_name function 2022-02-16 12:51:44 +01:00
nfs4proc.c NFSv4: nfs4_proc_set_acl needs to restore NFS_CAP_UIDGID_NOMAP on error. 2021-06-16 11:55:02 +02:00
nfs4renewd.c
nfs4session.c
nfs4session.h
nfs4state.c NFSv4: Protect the state recovery thread against direct reclaim 2022-04-15 14:15:03 +02:00
nfs4super.c NFSv4: Fix a pNFS layout related use-after-free race when freeing the inode 2021-01-06 14:45:01 +01:00
nfs4sysctl.c nfs: Do not convert nfs_idmap_cache_timeout to jiffies 2018-01-18 15:10:47 -05:00
nfs4trace.c
nfs4trace.h NFSv4: Fix a tracepoint Oops in initiate_file_draining() 2018-09-14 16:24:08 -04:00
nfs4xdr.c NFSv4 remove zero number of fs_locations entries error check 2022-02-16 12:51:44 +01:00
nfs42.h
nfs42proc.c NFSv42: Fix pagecache invalidation after COPY/CLONE 2021-12-08 08:50:11 +01:00
nfs42xdr.c NFSv42: Don't fail clone() unless the OP_CLONE operation failed 2021-12-01 09:27:42 +01:00
nfsroot.c
nfstrace.c
nfstrace.h NFS client updates for Linux 4.16 2018-01-30 19:03:48 -08:00
pagelist.c NFS: Don't corrupt the value of pg_bytes_written in nfs_do_recoalesce() 2021-06-03 08:38:08 +02:00
pnfs.c NFSv4/pNFS: Fix another issue with a list iterator pointing to the head 2022-04-15 14:14:53 +02:00
pnfs.h NFSv4/pNFS: Fix another issue with a list iterator pointing to the head 2022-04-15 14:14:53 +02:00
pnfs_dev.c pnfs/blocklayout: handle transient devices 2018-01-14 23:06:29 -05:00
pnfs_nfs.c pnfs/flexfiles: Fix misplaced barrier in nfs4_ff_layout_prepare_ds 2021-11-26 11:36:14 +01:00
proc.c NFSv2: Fix write regression 2019-09-21 07:17:02 +02:00
read.c NFS: Pass error information to the pgio error cleanup routine 2019-09-06 10:22:23 +02:00
super.c fs/nfs: Fix nfs_parse_devname to not modify it's argument 2020-01-27 14:50:26 +01:00
symlink.c
sysctl.c
unlink.c NFS: Fix up sillyrename() 2018-05-31 15:02:16 -04:00
write.c NFS: Fix deadlocks in nfs_scan_commit_list() 2021-11-26 11:36:14 +01:00