linux-stable/fs/nfsd
J. Bruce Fields df8596f577 Revert "nfsd4: a client's own opens needn't prevent delegations"
commit 6ee65a7730 upstream.

This reverts commit 94415b06eb.

That commit claimed to allow a client to get a read delegation when it
was the only writer.  Actually it allowed a client to get a read
delegation when *any* client has a write open!

The main problem is that it's depending on nfs4_clnt_odstate structures
that are actually only maintained for pnfs exports.

This causes clients to miss writes performed by other clients, even when
there have been intervening closes and opens, violating close-to-open
cache consistency.

We can do this a different way, but first we should just revert this.

I've added pynfs 4.1 test DELEG19 to test for this, as I should have
done originally!

Cc: stable@vger.kernel.org
Reported-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-20 10:43:44 +01:00
..
acl.h nfsd: eliminate an unnecessary acl size limit 2019-08-28 21:13:45 -04:00
auth.c nfsd: auth: Fix gid sorting when rootsquash enabled 2018-01-22 20:13:07 -08:00
auth.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
blocklayout.c block: add a bdev_is_partition helper 2020-09-25 08:18:57 -06:00
blocklayoutxdr.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
blocklayoutxdr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cache.h nfsd4: make drc_slab global, not per-net 2020-06-01 17:44:45 -04:00
current_stateid.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
export.c NFSD: Map nfserr_wrongsec outside of nfsd_dispatch 2020-10-02 09:37:42 -04:00
export.h knfsd: Allow lockless lookups of the exports 2018-10-29 16:58:04 -04:00
fault_inject.c nfsd: no need to check return value of debugfs_create functions 2019-07-03 16:57:17 +02:00
filecache.c fsnotify: generalize handle_inode_event() 2020-12-30 11:54:18 +01:00
filecache.h nfsd: convert file cache to use over/underflow safe refcount 2020-02-06 11:22:55 -05:00
flexfilelayout.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
flexfilelayoutxdr.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
flexfilelayoutxdr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
idmap.h
Kconfig NFSv4.2: Fix NFS4ERR_STALE error when doing inter server copy 2020-10-21 10:31:20 -04:00
lockd.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile nfsd: remove fault injection code 2020-09-25 18:01:26 -04:00
netns.h nfsd: netns.h: delete a duplicated word 2020-07-24 17:25:13 -04:00
nfs2acl.c NFSD: Hoist status code encoding into XDR encoder functions 2020-10-12 10:29:44 -04:00
nfs3acl.c NFSD: Hoist status code encoding into XDR encoder functions 2020-10-12 10:29:44 -04:00
nfs3proc.c NFSD: MKNOD should return NFSERR_BADTYPE instead of NFSERR_INVAL 2020-11-05 17:20:12 -05:00
nfs3xdr.c nfsd4: readdirplus shouldn't return parent of export 2021-01-23 16:03:58 +01:00
nfs4acl.c
nfs4callback.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
nfs4idmap.c nfsd: Use seq_putc() in two functions 2020-07-13 17:28:46 -04:00
nfs4layouts.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
nfs4proc.c NFSD: fix missing refcount in nfsd4_copy by nfsd4_do_async_copy 2020-11-05 17:25:14 -05:00
nfs4recover.c nfsd: avoid a NULL dereference in __cld_pipe_upcall() 2020-07-13 17:28:46 -04:00
nfs4state.c Revert "nfsd4: a client's own opens needn't prevent delegations" 2021-03-20 10:43:44 +01:00
nfs4xdr.c nfsd: Don't set eof on a truncated READ_PLUS 2021-01-27 11:55:05 +01:00
nfscache.c silence nfscache allocation warnings with kvzalloc 2020-09-25 18:01:28 -04:00
nfsctl.c nfsd: register pernet ops last, unregister first 2021-03-04 11:38:07 +01:00
nfsd.h nfsd: add defines for NFSv4.2 extended attribute support 2020-07-13 17:27:03 -04:00
nfsfh.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
nfsfh.h nfsd: handle nfs3 timestamps as unsigned 2019-12-19 17:46:08 -05:00
nfsproc.c NFSD: Hoist status code encoding into XDR encoder functions 2020-10-12 10:29:44 -04:00
nfssvc.c nfsd: Fix message level for normal termination 2020-12-30 11:53:44 +01:00
nfsxdr.c NFSD: Hoist status code encoding into XDR encoder functions 2020-10-12 10:29:44 -04:00
pnfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
state.h nfsd: remove fault injection code 2020-09-25 18:01:26 -04:00
stats.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
stats.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace.c
trace.h nfsd: rename delegation related tracepoints to make them less confusing 2020-09-25 18:01:27 -04:00
vfs.c NFSD: Correct type annotations in user xattr helpers 2020-09-25 18:01:27 -04:00
vfs.h nfsd: define xattr functions to call into their vfs counterparts 2020-07-13 17:27:03 -04:00
xdr.h NFSD: Hoist status code encoding into XDR encoder functions 2020-10-12 10:29:44 -04:00
xdr3.h NFSD: Encoder and decoder functions are always present 2020-10-02 09:37:41 -04:00
xdr4.h NFSD: Encoder and decoder functions are always present 2020-10-02 09:37:41 -04:00
xdr4cb.h NFSD CB_OFFLOAD xdr 2018-09-25 20:34:54 -04:00