diff options
| author | NeilBrown <neil@brown.name> | 2026-07-17 19:27:55 +1000 |
|---|---|---|
| committer | Chuck Lever <cel@kernel.org> | 2026-08-26 16:40:21 -0400 |
| commit | 7371201b92c8eeb39fc7f5cb2fbf19c58d284575 (patch) | |
| tree | 295481f69e64870ba4fcbc4e897c24944a0b7601 /scripts/Makefile.thinlto | |
| parent | 2615ee4a54df1ae56409d199275e7a0a3f8d7a40 (diff) | |
| download | linux-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/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
