summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNeilBrown <neil@brown.name>2026-07-17 19:27:55 +1000
committerChuck Lever <cel@kernel.org>2026-08-26 16:40:21 -0400
commit7371201b92c8eeb39fc7f5cb2fbf19c58d284575 (patch)
tree295481f69e64870ba4fcbc4e897c24944a0b7601 /scripts
parent2615ee4a54df1ae56409d199275e7a0a3f8d7a40 (diff)
downloadlinux-next-7371201b92c8eeb39fc7f5cb2fbf19c58d284575.tar.gz
linux-next-7371201b92c8eeb39fc7f5cb2fbf19c58d284575.zip
nfsd: remove subtlety from nfsd4_create_file()
nfsd4_create_file() has a switch with cases for NFS4_CREATE_EXCLUSIVE and NFS4_CREATE_EXCLUSIVE4_1 which are identical except for one line which is marked "subtle" in both cases. The difference boils down to a "goto". For the EXCLUSIVE case the target is "out:" which is after a setattr call. For EXCLUSIVE4_1 the target is "set_attr:" which is the start of that setattr call. In the EXCLUSIVE case 'attrs' will only contain the verifier. Setting these again is not harmful as discussed in the previous patch. It will also call commit_metadata(). In performance terms the cost of an extra 'commit' in the rare case of a replaying exclusive create is negligible. So we can safely "goto setattr" in both cases and thus simplify the code. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: NeilBrown <neil@brown.name> Link: https://patch.msgid.link/20260717093001.1972119-8-neilb@ownmail.net Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions