Skip to contentSkip to conversation

unexport __mntput()

PATCH In review Coywolf Qi Hunt 4 participants 5 messages Aug 15, 2005 – Aug 16, 2005 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 unexport __mntput()

Hello,

Unexport __mntput() was talked about two months ago. http://lkml.org/lkml/2005/6/9/69
Modules should not call __mntput() directly. If autofs or nfsd does that, it's
being wrong.

Coywolf

fs/namespace.c renamed from fs/namespace.c~unexport-__mntput +0 -2
@@ -180,8 +180,6 @@
 	deactivate_super(sb);
 }
 
-EXPORT_SYMBOL(__mntput);
-
 /* iterator */
 static void *m_start(struct seq_file *m, loff_t *pos)
 {
#1 lore raw
Quoted 5 lines · Coywolf Qi Hunt

Hello,

Unexport __mntput() was talked about two months ago. http://lkml.org/lkml/2005/6/9/69
Modules should not call __mntput() directly. If autofs or nfsd does that, it's
being wrong.

I think you missed the point in the last discussion. __mntput is called from mntput(), which autofs and nfsd call. Their use is correct given what they do:

Autofs 3 and 4 use it for walking the vfsmount tree and determining if/when a mountpoint is ready to expire.

Nfsd uses it to serve up nfs exports that don't cross mountpoints (or do, if "crossmnt" is specified in /etc/exports.

Thanks,

Mike Waychison

Quoted 16 lines

Coywolf

fs/namespace.c renamed from fs/namespace.c~unexport-__mntput +0 -2
@@ -180,8 +180,6 @@
 	deactivate_super(sb);
 }
 
-EXPORT_SYMBOL(__mntput);
-
 /* iterator */
 static void *m_start(struct seq_file *m, loff_t *pos)
 {
#2 lore raw
Quoted 8 lines · Mike Waychison
Quoted 5 lines · Coywolf Qi Hunt

Hello,

Unexport __mntput() was talked about two months ago. http://lkml.org/lkml/2005/6/9/69
Modules should not call __mntput() directly. If autofs or nfsd does that, it's
being wrong.

I think you missed the point in the last discussion. __mntput is called

Yes, indeed.

Quoted 8 lines

from mntput(), which autofs and nfsd call. Their use is correct given what they do:

Autofs 3 and 4 use it for walking the vfsmount tree and determining if/when a mountpoint is ready to expire.

Nfsd uses it to serve up nfs exports that don't cross mountpoints (or do, if "crossmnt" is specified in /etc/exports.

And more than above, there's more stuff depend on it, af_unix, ipc message queues, etc.

Thanks for your help.

Signature · 2 lines
Coywolf Qi Hunt
http://ahbl.org/~coywolf/
#3 lore raw
In reply to Mike Waychison
Quoted 3 lines

Nfsd uses it to serve up nfs exports that don't cross mountpoints (or do, if "crossmnt" is specified in /etc/exports.

Is not this called nohide?

Jan Engelhardt

#4 lore raw
Quoted 7 lines · Jan Engelhardt
Quoted 2 lines

Nfsd uses it to serve up nfs exports that don't cross mountpoints (or do, if "crossmnt" is specified in /etc/exports.

Is not this called nohide?

On the command line it's a synonym, but the nfs-utils uses NFSEXP_CROSSMOUNT to tell the kernel.

Mike Waychison