Page MenuHomeFreeBSD

nfs_pub: move from vfs_subr.c to vfs_export.c
ClosedPublic

Authored by rlibby on Sun, May 3, 10:41 PM.
Tags
None
Referenced Files
F157390870: D56777.id177179.diff
Wed, May 20, 10:21 PM
Unknown Object (File)
Mon, May 18, 3:31 AM
Unknown Object (File)
Sun, May 17, 5:46 AM
Unknown Object (File)
Sun, May 17, 12:02 AM
Unknown Object (File)
Sat, May 16, 9:28 PM
Unknown Object (File)
Sat, May 16, 1:15 AM
Unknown Object (File)
Tue, May 12, 11:37 AM
Unknown Object (File)
Tue, May 12, 5:20 AM
Subscribers

Details

Summary

nfs_pub is used only in vfs_export.c.


This is cosmetic.

Test Plan

make buildkernel

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 72776
Build 69659: arc lint + arc unit

Event Timeline

rlibby edited the test plan for this revision. (Show Details)
rlibby added a reviewer: rmacklem.
sys/kern/vfs_export.c
67

You should be able to define this as static now,
I think? And, if so, you probably want to get rid
of the "extern struct nfs_public nfs_pub;" in sys/mount.h.

rlibby marked an inline comment as done.
rlibby added inline comments.
sys/kern/vfs_export.c
67

Yes, it will build like that. I wasn't sure if there was some other reason it was globally visible. I'll make it static in vfs_export.c if that's your preference.

Do you think that the struct nfs_public definition should also move from mount.h to vfs_export.c?

sys/kern/vfs_export.c
67

Good question. I don't have a good answer.
struct nfs_public is actually exposed to userland,
since it is not #ifdef _KERNEL'd in mount.h.

I can't think of why any third party software
would have a use for it, but??

Do whatever you think it best.
(You might want to check with kib@ if
you are going to change mount.h, since
he takes care of that.)

Even making nfs_pub static was just a
suggestion, to limit its namespace exposure.

Personally, I'd leave it in mount.h, but it's up
to you.

rlibby marked an inline comment as done.

rmacklem feedback: nfs_pub can be static in vfs_export.c

This revision is now accepted and ready to land.Mon, May 4, 5:40 PM
This revision was automatically updated to reflect the committed changes.