From f2dfdbc75c52c32c72ef9ecbb8b66cf01b28926c Mon Sep 17 00:00:00 2001 From: Craig Rodrigues Date: Sat, 17 Jun 2006 20:02:28 +0000 Subject: MFC: msdosfs_vfsops.c:1.150, ntfs_vfsops.c:1.83, udf_vfsops.c:1.41 ext2_vfsops.c:1.157, cd9660_vfsops.c:1.145, ffs_vfsops.c:1.314, reiserfs_vfsops.c:1.5 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. --- sys/gnu/fs/ext2fs/ext2_vfsops.c | 11 +++-------- sys/gnu/fs/reiserfs/reiserfs_vfsops.c | 6 ++---- 2 files changed, 5 insertions(+), 12 deletions(-) (limited to 'sys/gnu') diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index 0a288cd8679b..6b6e672e084d 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -129,7 +129,6 @@ ext2_mount(mp, td) struct mount *mp; struct thread *td; { - struct export_args *export; struct vfsoptlist *opts; struct vnode *devvp; struct ext2mount *ump = 0; @@ -233,13 +232,9 @@ ext2_mount(mp, td) fs->s_rd_only = 0; mp->mnt_flag &= ~MNT_RDONLY; } - if (fspec == NULL) { - error = vfs_getopt(opts, "export", (void **)&export, - &len); - if (error || len != sizeof(struct export_args)) - return (EINVAL); - /* Process export requests. */ - return (vfs_export(mp, export)); + if (vfs_flagopt(opts, "export", NULL, 0)) { + /* Process export requests in vfs_mount.c. */ + return (error); } } /* diff --git a/sys/gnu/fs/reiserfs/reiserfs_vfsops.c b/sys/gnu/fs/reiserfs/reiserfs_vfsops.c index db9511260ee0..bbc669567206 100644 --- a/sys/gnu/fs/reiserfs/reiserfs_vfsops.c +++ b/sys/gnu/fs/reiserfs/reiserfs_vfsops.c @@ -79,7 +79,6 @@ reiserfs_mount(struct mount *mp, struct thread *td) char *path, *fspec; struct vnode *devvp; struct vfsoptlist *opts; - struct export_args *export; struct reiserfs_mount *rmp; struct reiserfs_sb_info *sbi; struct nameidata nd, *ndp = &nd; @@ -104,9 +103,8 @@ reiserfs_mount(struct mount *mp, struct thread *td) /* Handle MNT_UPDATE (mp->mnt_flag) */ if (mp->mnt_flag & MNT_UPDATE) { /* For now, only NFS export is supported. */ - error = vfs_getopt(opts, "export", (void **)&export, &len); - if (error == 0 && len == sizeof(*export) && export->ex_flags) - return (vfs_export(mp, export)); + if (vfs_flagopt(opts, "export", NULL, 0)) + return (0); } /* Not an update, or updating the name: look up the name -- cgit v1.3