Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jul 2006 18:22:38 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 102304 for review
Message-ID:  <200607241822.k6OIMcXG022540@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=102304

Change 102304 by jhb@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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607241822.k6OIMcXG022540>