]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfsd: use ATTR_DELEG in nfsd4_finalize_deleg_timestamps()
authorJeff Layton <jlayton@kernel.org>
Wed, 3 Dec 2025 15:52:15 +0000 (10:52 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:17:13 +0000 (10:17 +0100)
commit1285073c878aac838dfadb6e19acdd65c30c2a76
treef275ad709ca3f2396c2eb319bd7cfea69adb7258
parentc07dc84ed67c5a182273171639bacbbb87c12175
nfsd: use ATTR_DELEG in nfsd4_finalize_deleg_timestamps()

commit 8f9e967830ff32ab7756f530a36adf74a9f12b76 upstream.

When finalizing timestamps that have never been updated and preparing to
release the delegation lease, the notify_change() call can trigger a
delegation break, and fail to update the timestamps. When this happens,
there will be messages like this in dmesg:

    [ 2709.375785] Unable to update timestamps on inode 00:39:263: -11

Since this code is going to release the lease just after updating the
timestamps, breaking the delegation is undesirable. Fix this by setting
ATTR_DELEG in ia_valid, in order to avoid the delegation break.

Fixes: e5e9b24ab8fa ("nfsd: freeze c/mtime updates with outstanding WRITE_ATTRS delegation")
Cc: stable@vger.kernel.org
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfs4state.c