PERFORCE change 111696 for review

John Baldwin jhb at FreeBSD.org
Thu Dec 14 07:15:55 PST 2006


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

Change 111696 by jhb at jhb_mutex on 2006/12/14 15:14:23

	Hold reference on the mountpoint across VFS_QUOTACTL().

Affected files ...

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

Differences ...

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

@@ -202,12 +202,14 @@
 	NDFREE(&nd, NDF_ONLY_PNBUF);
 	error = vn_start_write(nd.ni_vp, &vmp, V_WAIT | PCATCH);
 	mp = nd.ni_vp->v_mount;
+	vfs_ref(mp);
 	vrele(nd.ni_vp);
 	if (error)
 		goto out;
 	error = VFS_QUOTACTL(mp, uap->cmd, uap->uid, uap->arg, td);
 	vn_finished_write(vmp);
 out:
+	vfs_rel(mp);
 	VFS_UNLOCK_GIANT(vfslocked);
 	return (error);
 }


More information about the p4-projects mailing list