PERFORCE change 102304 for review

John Baldwin jhb at FreeBSD.org
Mon Jul 24 18:22:39 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=102304

Change 102304 by jhb at jhb_mutex on 2006/07/24 18:21:46

	Hold the reference on the mountpoint longer since
	prison_enforce_statfs() likes to fondle the mountpoint.

Affected files ...

.. //depot/projects/smpng/sys/kern/vfs_syscalls.c#113 edit

Differences ...

==== //depot/projects/smpng/sys/kern/vfs_syscalls.c#113 (text+ko) ====

@@ -266,7 +266,6 @@
 	sp->f_namemax = NAME_MAX;
 	sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
 	error = VFS_STATFS(mp, sp, td);
-	vfs_rel(mp);
 	if (error)
 		goto out;
 	if (suser(td)) {
@@ -277,6 +276,7 @@
 	}
 	*buf = *sp;
 out:
+	vfs_rel(mp);
 	VFS_UNLOCK_GIANT(vfslocked);
 	if (mtx_owned(&Giant))
 		printf("statfs(%d): %s: %d\n", vfslocked, path, error);
@@ -355,7 +355,6 @@
 	sp->f_namemax = NAME_MAX;
 	sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
 	error = VFS_STATFS(mp, sp, td);
-	vfs_rel(mp);
 	if (error)
 		goto out;
 	if (suser(td)) {
@@ -366,6 +365,7 @@
 	}
 	*buf = *sp;
 out:
+	vfs_rel(mp);
 	VFS_UNLOCK_GIANT(vfslocked);
 	return (error);
 }


More information about the p4-projects mailing list