]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFSD: Clear TIME_DELEG in the suppattr_exclcreat bitmap
authorChuck Lever <chuck.lever@oracle.com>
Mon, 17 Nov 2025 16:00:50 +0000 (11:00 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Jan 2026 11:57:24 +0000 (12:57 +0100)
commit42ed4c781019e4c19af74b9edd1f7e31b439c2c9
tree7639dc0d8487e6ff728b3e9890beafff08a949c0
parent5060592025103e78cc90854a9c8d64591fbeccf1
NFSD: Clear TIME_DELEG in the suppattr_exclcreat bitmap

commit ad3cbbb0c1892c48919727fcb8dec5965da8bacb upstream.

>From RFC 8881:

5.8.1.14. Attribute 75: suppattr_exclcreat

> The bit vector that would set all REQUIRED and RECOMMENDED
> attributes that are supported by the EXCLUSIVE4_1 method of file
> creation via the OPEN operation. The scope of this attribute
> applies to all objects with a matching fsid.

There's nothing in RFC 8881 that states that suppattr_exclcreat is
or is not allowed to contain bits for attributes that are clear in
the reported supported_attrs bitmask. But it doesn't make sense for
an NFS server to indicate that it /doesn't/ implement an attribute,
but then also indicate that clients /are/ allowed to set that
attribute using OPEN(create) with EXCLUSIVE4_1.

The FATTR4_WORD2_TIME_DELEG attributes are also not to be allowed
for OPEN(create) with EXCLUSIVE4_1. It doesn't make sense to set
a delegated timestamp on a new file.

Fixes: 7e13f4f8d27d ("nfsd: handle delegated timestamps in SETATTR")
Cc: stable@vger.kernel.org
Reviewed-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/nfsd.h