Minor cleanup. If we are doing a mount update, and we pass in
an "export" flag indicating that we are trying to NFS export the filesystem, and the MSDOSFS_LARGEFS flag is set on the filesystem, then deny the mount update and export request. Otherwise, let the full mount update proceed normally. MSDOSFS_LARGES and NFS don't mix because of the way inodes are calculated for MSDOSFS_LARGEFS. MFC after: 3 days
This commit is contained in:
parent
6890d7af94
commit
e9022ef898
@ -262,11 +262,15 @@ msdosfs_mount(struct mount *mp, struct thread *td)
|
||||
pmp = VFSTOMSDOSFS(mp);
|
||||
|
||||
if (vfs_flagopt(mp->mnt_optnew, "export", NULL, 0)) {
|
||||
/* Process export requests. */
|
||||
if ((pmp->pm_flags & MSDOSFS_LARGEFS) != 0)
|
||||
/*
|
||||
* Forbid export requests if filesystem has
|
||||
* MSDOSFS_LARGEFS flag set.
|
||||
*/
|
||||
if ((pmp->pm_flags & MSDOSFS_LARGEFS) != 0) {
|
||||
vfs_mount_error(mp,
|
||||
"MSDOSFS_LARGEFS flag set, cannot export");
|
||||
return (EOPNOTSUPP);
|
||||
else
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
if (!(pmp->pm_flags & MSDOSFSMNT_RONLY) &&
|
||||
vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0)) {
|
||||
|
Loading…
Reference in New Issue
Block a user