summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormohans <mohans@FreeBSD.org>2006-05-30 20:32:44 +0000
committermohans <mohans@FreeBSD.org>2006-05-30 20:32:44 +0000
commitb2a8ee65bc6f5b5e9e1e4546be9aee994997278b (patch)
tree88f8d5b977f05c7c9a3ebc883a55f8a52a607f7f
parent1694caa7585f46f63e7d725dfd27aa37018ee172 (diff)
downloadFreeBSD-src-b2a8ee65bc6f5b5e9e1e4546be9aee994997278b.zip
FreeBSD-src-b2a8ee65bc6f5b5e9e1e4546be9aee994997278b.tar.gz
Kris Kennaway found that for '/' NFS mounts, the MPSAFE mount flag was
not being set, which means Giant would be acquired for these mounts.
-rw-r--r--sys/nfsclient/nfs_vfsops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c
index fdd72f8..bd9adc2 100644
--- a/sys/nfsclient/nfs_vfsops.c
+++ b/sys/nfsclient/nfs_vfsops.c
@@ -773,8 +773,9 @@ nfs_mount(struct mount *mp, struct thread *td)
goto out;
args.fh = nfh;
error = mountnfs(&args, mp, nam, hst, &vp, td->td_ucred);
- mp->mnt_kern_flag |= MNTK_MPSAFE;
out:
+ if (!error)
+ mp->mnt_kern_flag |= MNTK_MPSAFE;
return (error);
}
OpenPOWER on IntegriCloud