summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2006-12-09 01:49:19 +0000
committerrodrigc <rodrigc@FreeBSD.org>2006-12-09 01:49:19 +0000
commitca5229f78139f391149420e00cc27552d2ca69a4 (patch)
treea95928b35eb0f91c4f663288223ef0a0720ded49 /sys
parent7d4ff41e1b93f860caac907854787b88eaecfb25 (diff)
downloadFreeBSD-src-ca5229f78139f391149420e00cc27552d2ca69a4.zip
FreeBSD-src-ca5229f78139f391149420e00cc27552d2ca69a4.tar.gz
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
Diffstat (limited to 'sys')
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index b6d81f4..eb872bc 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -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)) {
OpenPOWER on IntegriCloud