OSDN Git Service

nfsd: grant read delegations to clients holding writes
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 16 Apr 2021 18:00:18 +0000 (14:00 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 19 Apr 2021 20:41:36 +0000 (16:41 -0400)
commitaba2072f452346d56a462718bcde93d697383148
treec42db8d613b8d0bf8d5de6717c5cd61225e9b506
parentebd9d2c2f5a7ebaaed2d7bb4dee148755f46033d
nfsd: grant read delegations to clients holding writes

It's OK to grant a read delegation to a client that holds a write,
as long as it's the only client holding the write.

We originally tried to do this in commit 94415b06eb8a ("nfsd4: a
client's own opens needn't prevent delegations"), which had to be
reverted in commit 6ee65a773096 ("Revert "nfsd4: a client's own
opens needn't prevent delegations"").

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/locks.c
fs/nfsd/nfs4state.c