On 2020-03-23, Martin Pieuchot wrote: > Most of the VOP_* methods include an argument of type "struct proc *" > called `a_p'. This pointer is always set to `curproc' as confirmed by > the diff below. The diff has been though base build with NFS on amd64 > and sparc64 as well as a full port bulk on amd64 and is in the current > octeon port bulk. > > I'd like to commit it in order to start removing the requirement of > passing a "struct proc *" pointer which is always set to curproc. This > is unnecessary and has spread in many other places in the kernel. > > That makes codes unnecessarily complicated: > - a "struct proc *" is carried over just to satisfy already complex > interfaces > - it isn't obvious which "struct proc *" is not the curproc and > asserts like KASSERT(p == curproc) are being made > - in many places where curproc is used people put XXX as if it was > wrong > > So this is just a starting diff, cleanups can start afterward.
If this is a temporary measure, I think it should include some annotation to that effect, so that it doesn't continue spreading.