Page MenuHomeFreeBSD

Push down td in the NFS server code.
ClosedPublic

Authored by trasz on Mar 1 2019, 2:50 PM.
Tags
None
Referenced Files
F103288543: D19419.diff
Sat, Nov 23, 2:51 AM
Unknown Object (File)
Sun, Oct 27, 9:47 AM
Unknown Object (File)
Oct 4 2024, 12:47 AM
Unknown Object (File)
Sep 30 2024, 11:42 PM
Unknown Object (File)
Sep 27 2024, 9:43 PM
Unknown Object (File)
Sep 27 2024, 7:18 AM
Unknown Object (File)
Sep 24 2024, 6:51 AM
Unknown Object (File)
Sep 22 2024, 7:21 PM
Subscribers

Details

Summary

Push down the thread argument in NFS server code, using curthread
instead of passing it explicitly. No functional changes. This is largely
a mechanical change, but I'd still prefer a second pair of eyes to make
sure I hadn't missed anything.

This includes changes from https://reviews.freebsd.org/D19417.
Obviously they will be committed separately.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 22828
Build 21916: arc lint + arc unit

Event Timeline

trasz edited the summary of this revision. (Show Details)

Looks ok. I'm not sure I understand why having a lot of "struct thread *p = curthread;"s in
the local variables of the functions is an improvement over passing it as an argument,
but I see no harm in it?

This revision is now accepted and ready to land.Mar 2 2019, 8:31 PM

The problem I'm trying to solve is that as it is right now, throughout the entire kernel, it's hard to say if you can call a kernel function for any thread, or just curthread. The way to fix it is to remove the thread argument in cases where it has to be equal to curthread.

I expect most of the newly added 'struct thread *p = curthread;' lines to disappear later on, when I push the 'td' even lower.

This revision now requires review to proceed.Mar 4 2019, 1:08 PM
This revision was not accepted when it landed; it landed in state Needs Review.Mar 4 2019, 1:12 PM
This revision was automatically updated to reflect the committed changes.