]> Gentwo Git Trees - linux/.git/commit
nfsd: fix SETATTR updates for delegated timestamps
authorJeff Layton <jlayton@kernel.org>
Wed, 30 Jul 2025 13:24:35 +0000 (09:24 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Sun, 21 Sep 2025 23:24:50 +0000 (19:24 -0400)
commit3952f1cbcbc454b2cb639ddbf165c07068e90371
tree0daecd26fa5e8fb07441147bd7af10d8a18be30a
parent7663e963a51122792811811c8119fd55c9ab254a
nfsd: fix SETATTR updates for delegated timestamps

SETATTRs containing delegated timestamp updates are currently not being
vetted properly. Since we no longer need to compare the timestamps vs.
the current timestamps, move the vetting of delegated timestamps wholly
into nfsd.

Rename the set_cb_time() helper to nfsd4_vet_deleg_time(), and make it
non-static. Add a new vet_deleg_attrs() helper that is called from
nfsd4_setattr that uses nfsd4_vet_deleg_time() to properly validate the
all the timestamps. If the validation indicates that the update should
be skipped, unset the appropriate flags in ia_valid.

Fixes: 7e13f4f8d27d ("nfsd: handle delegated timestamps in SETATTR")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4proc.c
fs/nfsd/nfs4state.c
fs/nfsd/state.h