diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c index 21290594e6e9..569e74a77e7a 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c @@ -65,7 +65,7 @@ static b_strategy_t xfs_geom_strategy; static const char *xfs_opts[] = { "from", "flags", "logbufs", "logbufsize", "rtname", "logname", "iosizelog", "sunit", - "swidth", + "swidth", "export", NULL }; static void @@ -168,6 +168,16 @@ _xfs_mount(struct mount *mp, if (vfs_filteropt(mp->mnt_optnew, xfs_opts)) return (EINVAL); + if (mp->mnt_flag & MNT_UPDATE) { + /* + * XXX: Only support update mounts for NFS export. + */ + if (vfs_flagopt(mp->mnt_optnew, "export", NULL, 0)) + return (0); + else + return EOPNOTSUPP; + } + xmp = xfsmount_allocate(mp); if (xmp == NULL) return (ENOMEM); @@ -179,10 +189,6 @@ _xfs_mount(struct mount *mp, XFSTOVFS(xmp)->vfs_flag |= VFS_RDONLY; mp->mnt_flag |= MNT_RDONLY; - /* XXX: Do not support MNT_UPDATE yet */ - if (mp->mnt_flag & MNT_UPDATE) - return EOPNOTSUPP; - curcred = td->td_ucred; XVFS_MOUNT(XFSTOVFS(xmp), &xmp->m_args, curcred, error); if (error)