diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2006-05-26 00:32:21 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2006-05-26 00:32:21 +0000 |
commit | 055e2abe682260c3bd89cb00f5394de7b740ef8f (patch) | |
tree | bfa82c4a9f9f6f846eca600d11df0ab4efb807be /sys/kern/vfs_mount.c | |
parent | 7854550aa7231727cd1721be60fadda01bbf0834 (diff) | |
download | FreeBSD-src-055e2abe682260c3bd89cb00f5394de7b740ef8f.zip FreeBSD-src-055e2abe682260c3bd89cb00f5394de7b740ef8f.tar.gz |
Remove calls to vfs_export() for exporting a filesystem for NFS mounting
from individual filesystems. Call it instead in vfs_mount.c,
after we call VFS_MOUNT() for a specific filesystem.
Diffstat (limited to 'sys/kern/vfs_mount.c')
-rw-r--r-- | sys/kern/vfs_mount.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 2f60942..23becc3 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -777,6 +777,7 @@ vfs_domount( struct vnode *vp; struct mount *mp; struct vfsconf *vfsp; + struct export_args export; int error, flag = 0, kern_flag = 0; struct vattr va; struct nameidata nd; @@ -933,6 +934,17 @@ vfs_domount( * get. No freeing of cn_pnbuf. */ error = VFS_MOUNT(mp, td); + + /* + * Process the export option only if we are + * updating mount options. + */ + if (!error && (fsflags & MNT_UPDATE)) { + if (vfs_copyopt(mp->mnt_optnew, "export", &export, + sizeof(export)) == 0) + error = vfs_export(mp, &export); + } + if (!error) { if (mp->mnt_opt != NULL) vfs_freeopts(mp->mnt_opt); |