Skip to content
Commit 0df5dd4a authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFSv4: fix delegated locking



Arnaud Giersch reports that NFSv4 locking is broken when we hold a
delegation since commit 8e469ebd (NFSv4:
Don't allow posix locking against servers that don't support it).

According to Arnaud, the lock succeeds the first time he opens the file
(since we cannot do a delegated open) but then fails after we start using
delegated opens.

The following patch fixes it by ensuring that locking behaviour is
governed by a per-filesystem capability flag that is initially set, but
gets cleared if the server ever returns an OPEN without the
NFS4_OPEN_RESULT_LOCKTYPE_POSIX flag being set.

Reported-by: default avatarArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@kernel.org
parent 2c61be0a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment