Page MenuHomeFreeBSD

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

Authored by rlibby on May 3 2026, 10:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 10, 4:00 PM
Unknown Object (File)
Sun, Sep 6, 1:05 AM
Unknown Object (File)
Mon, Aug 31, 3:00 AM
Unknown Object (File)
Fri, Aug 28, 8:14 AM
Unknown Object (File)
Tue, Aug 25, 1:16 AM
Unknown Object (File)
Sat, Aug 22, 6:51 AM
Unknown Object (File)
Fri, Aug 21, 7:42 AM
Unknown Object (File)
Thu, Aug 20, 5:06 PM
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.May 4 2026, 5:40 PM
This revision was automatically updated to reflect the committed changes.