On Wed, Apr 20, 2022 at 07:31:09PM +0000, Chuck Lever III wrote: > > I wonder if it'd be > > possible to keep the two paths free of complications from each other > > while sharing more code, e.g. if there are logical blocks of code that > > could now be pulled out into common helpers. > > I'm open to suggestions, but after the final patch in this > series, I don't see much else that is meaningful that can be > re-used by both. nfsd_create_setattr() was the one area that > seemed both common and heavyweight. The other areas are just > lightweight sanity checks. > > And honestly, in this case, I don't think these code paths > are well-served by aggressive code de-duplication. The code > in each case is more readable and less brittle this way. The > NFSv4 code path now has some comments that mark the subtle > differences with NFSv3 exclusive create, and now you can't > break NFSv3 CREATE by making a change to NFSv4 OPEN, which > is far more complex. I can live with that. Also, this passes all my usual regression tests, FWIW. --b.