Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jul 2002 19:23:19 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 14117 for review
Message-ID:  <200207120223.g6C2NJeO067062@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=14117

Change 14117 by peter@peter_daintree on 2002/07/11 19:23:15

	IFC @14116
	(I'm actually using cvs for this, but it is useful to keep history here)

Affected files ...

.. //depot/projects/pmap/sys/conf/NOTES#3 integrate
.. //depot/projects/pmap/sys/conf/kmod.mk#6 integrate
.. //depot/projects/pmap/sys/i386/i386/mp_machdep.c#21 integrate
.. //depot/projects/pmap/sys/i386/isa/apic_vector.s#10 integrate
.. //depot/projects/pmap/sys/kern/kern_exec.c#7 integrate
.. //depot/projects/pmap/sys/kern/kern_shutdown.c#6 integrate
.. //depot/projects/pmap/sys/kern/kern_switch.c#6 integrate
.. //depot/projects/pmap/sys/netinet/tcp_subr.c#5 integrate
.. //depot/projects/pmap/sys/netinet/udp_usrreq.c#4 integrate
.. //depot/projects/pmap/sys/nfsclient/nfs_bio.c#6 integrate
.. //depot/projects/pmap/sys/nfsclient/nfs_nfsiod.c#3 integrate
.. //depot/projects/pmap/sys/nfsclient/nfs_node.c#3 integrate
.. //depot/projects/pmap/sys/nfsclient/nfs_socket.c#5 integrate
.. //depot/projects/pmap/sys/nfsclient/nfs_subs.c#3 integrate
.. //depot/projects/pmap/sys/nfsclient/nfs_vfsops.c#4 integrate
.. //depot/projects/pmap/sys/nfsclient/nfs_vnops.c#4 integrate
.. //depot/projects/pmap/sys/nfsserver/nfs_serv.c#7 integrate
.. //depot/projects/pmap/sys/nfsserver/nfs_srvsock.c#4 integrate
.. //depot/projects/pmap/sys/nfsserver/nfs_srvsubs.c#5 integrate
.. //depot/projects/pmap/sys/nfsserver/nfs_syscalls.c#4 integrate
.. //depot/projects/pmap/sys/sparc64/sparc64/trap.c#7 integrate

Differences ...

==== //depot/projects/pmap/sys/conf/NOTES#3 (text+ko) ====

@@ -5,7 +5,7 @@
 # 'makeoptions', 'hints' etc go into the kernel configuration that you
 # run config(8) with.
 #
-# Lines that begin with 'hints.' are NOT for config(8), they go into your
+# Lines that begin with 'hint.' are NOT for config(8), they go into your
 # hints file.  See /boot/device.hints and/or the 'hints' config(8) directive.
 #
 # Please use ``make LINT'' to create an old-style LINT file if you want to
@@ -14,7 +14,7 @@
 # This file contains machine independent kernel configuration notes.  For
 # machine dependent notes, look in /sys/<arch>/conf/NOTES.
 #
-# $FreeBSD: src/sys/conf/NOTES,v 1.1044 2002/07/11 04:15:53 ken Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1045 2002/07/11 20:43:37 bde Exp $
 #
 
 #
@@ -1821,26 +1821,26 @@
 #               device  rp	# core driver support
 #
 #   Comtrol Rocketport ISA single card
-#		hints.rp.0.at="isa"
-#		hints.rp.0.port="0x280"
+#		hint.rp.0.at="isa"
+#		hint.rp.0.port="0x280"
 #
 #   If instead you have two ISA cards, one installed at 0x100 and the
 #   second installed at 0x180, then you should add the following to
 #   your kernel probe hints:
-#		hints.rp.0.at="isa"
-#		hints.rp.0.port="0x100"
-#		hints.rp.1.at="isa"
-#		hints.rp.1.port="0x180"
+#		hint.rp.0.at="isa"
+#		hint.rp.0.port="0x100"
+#		hint.rp.1.at="isa"
+#		hint.rp.1.port="0x180"
 #
 #   For 4 ISA cards, it might be something like this:
-#		hints.rp.0.at="isa"
-#		hints.rp.0.port="0x180"
-#		hints.rp.1.at="isa"
-#		hints.rp.1.port="0x100"
-#		hints.rp.2.at="isa"
-#		hints.rp.2.port="0x340"
-#		hints.rp.3.at="isa"
-#		hints.rp.3.port="0x240"
+#		hint.rp.0.at="isa"
+#		hint.rp.0.port="0x180"
+#		hint.rp.1.at="isa"
+#		hint.rp.1.port="0x100"
+#		hint.rp.2.at="isa"
+#		hint.rp.2.port="0x340"
+#		hint.rp.3.at="isa"
+#		hint.rp.3.port="0x240"
 #
 #   For PCI cards, you need no hints.
 

==== //depot/projects/pmap/sys/conf/kmod.mk#6 (text+ko) ====

@@ -1,5 +1,5 @@
 #	From: @(#)bsd.prog.mk	5.26 (Berkeley) 6/25/91
-# $FreeBSD: src/sys/conf/kmod.mk,v 1.125 2002/06/17 20:01:06 n_hibma Exp $
+# $FreeBSD: src/sys/conf/kmod.mk,v 1.126 2002/07/11 14:13:37 ru Exp $
 #
 # The include file <bsd.kmod.mk> handles installing Kernel Loadable Device
 # drivers (KLD's).
@@ -9,8 +9,6 @@
 #
 # CLEANFILES	Additional files to remove for the clean and cleandir targets.
 #
-# DISTRIBUTION  Name of distribution. [bin]
-#
 # KMOD          The name of the kernel module to build.
 #
 # KMODDIR	Base path for kernel modules (see kld(4)). [/boot/kernel]
@@ -268,14 +266,6 @@
 realinstall: beforeinstall
 .endif
 
-DISTRIBUTION?=	bin
-.if !target(distribute)
-distribute:
-.for dist in ${DISTRIBUTION}
-	cd ${.CURDIR} ; $(MAKE) install DESTDIR=${DISTDIR}/${dist} SHARED=copies
-.endfor
-.endif
-
 .if !target(load)
 load:	${PROG}
 	${KMODLOAD} -v ${.OBJDIR}/${KMOD}.ko

==== //depot/projects/pmap/sys/i386/i386/mp_machdep.c#21 (text+ko) ====

@@ -22,7 +22,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/i386/i386/mp_machdep.c,v 1.186 2002/04/17 22:41:58 tegge Exp $
+ * $FreeBSD: src/sys/i386/i386/mp_machdep.c,v 1.187 2002/07/11 08:31:10 peter Exp $
  */
 
 #include "opt_cpu.h"

==== //depot/projects/pmap/sys/i386/isa/apic_vector.s#10 (text+ko) ====

@@ -1,6 +1,6 @@
 /*
  *	from: vector.s, 386BSD 0.1 unknown origin
- * $FreeBSD: src/sys/i386/isa/apic_vector.s,v 1.81 2002/04/01 23:51:17 dillon Exp $
+ * $FreeBSD: src/sys/i386/isa/apic_vector.s,v 1.83 2002/07/11 08:31:10 peter Exp $
  */
 
 

==== //depot/projects/pmap/sys/kern/kern_exec.c#7 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/kern/kern_exec.c,v 1.172 2002/07/06 07:00:01 jeff Exp $
+ * $FreeBSD: src/sys/kern/kern_exec.c,v 1.173 2002/07/11 18:48:05 alc Exp $
  */
 
 #include "opt_ktrace.h"
@@ -590,15 +590,18 @@
 
 		if ((rv != VM_PAGER_OK) || (ma[0] == NULL) || (ma[0]->valid == 0)) {
 			if (ma[0]) {
+				vm_page_lock_queues();
 				vm_page_protect(ma[0], VM_PROT_NONE);
 				vm_page_free(ma[0]);
+				vm_page_unlock_queues();
 			}
 			return EIO;
 		}
 	}
-
+	vm_page_lock_queues();
 	vm_page_wire(ma[0]);
 	vm_page_wakeup(ma[0]);
+	vm_page_unlock_queues();
 
 	pmap_qenter((vm_offset_t)imgp->image_header, ma, 1);
 	imgp->firstpage = ma[0];
@@ -614,7 +617,9 @@
 
 	if (imgp->firstpage) {
 		pmap_qremove((vm_offset_t)imgp->image_header, 1);
+		vm_page_lock_queues();
 		vm_page_unwire(imgp->firstpage, 1);
+		vm_page_unlock_queues();
 		imgp->firstpage = NULL;
 	}
 }

==== //depot/projects/pmap/sys/kern/kern_shutdown.c#6 (text+ko) ====

@@ -36,7 +36,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)kern_shutdown.c	8.3 (Berkeley) 1/21/94
- * $FreeBSD: src/sys/kern/kern_shutdown.c,v 1.129 2002/06/29 17:26:18 julian Exp $
+ * $FreeBSD: src/sys/kern/kern_shutdown.c,v 1.130 2002/07/11 21:56:37 jhb Exp $
  */
 
 #include "opt_ddb.h"
@@ -468,6 +468,8 @@
 	printf("cpuid = %d; ", PCPU_GET(cpuid));
 #ifdef APIC_IO
 	printf("lapic.id = %08x\n", lapic.id);
+#else
+	printf("\n");
 #endif
 #endif
 

==== //depot/projects/pmap/sys/kern/kern_switch.c#6 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/kern/kern_switch.c,v 1.29 2002/06/29 17:26:18 julian Exp $
+ * $FreeBSD: src/sys/kern/kern_switch.c,v 1.30 2002/07/11 22:47:58 julian Exp $
  */
 
 /***
@@ -160,7 +160,6 @@
 		td->td_kse->ke_state = KES_UNQUEUED; 
 		CTR1(KTR_RUNQ, "choosethread: td=%p (idle)", td);
 	}
-	thread_sanity_check(td);
 	return (td);
 }
 
@@ -177,7 +176,6 @@
 
 	kg = ke->ke_ksegrp;
 
-KASSERT((ke->ke_state != KES_ONRUNQ), ("kse_reassigning non-free kse"));
 	/*
 	 * Find the first unassigned thread
 	 * If there is a 'last assigned' then see what's next.
@@ -193,7 +191,6 @@
 	 * If we found one assign it the kse, otherwise idle the kse.
 	 */
 	if (td) {
-		thread_sanity_check(td);
 		kg->kg_last_assigned = td;
 		td->td_kse = ke;
 		ke->ke_thread = td;
@@ -201,13 +198,11 @@
 		CTR2(KTR_RUNQ, "kse_reassign: ke%p -> td%p", ke, td);
 	} else {
 		KASSERT((ke->ke_state != KES_IDLE), ("kse already idle"));
-KASSERT((ke->ke_kgrlist.tqe_next != ke), ("linked to self!"));
 		ke->ke_state = KES_IDLE;
 		ke->ke_thread = NULL;
 		TAILQ_INSERT_HEAD(&kg->kg_iq, ke, ke_kgrlist);
 		kg->kg_idle_kses++;
 		CTR1(KTR_RUNQ, "kse_reassign: ke%p idled", ke);
-KASSERT((ke->ke_kgrlist.tqe_next != ke), ("linked to self2!"));
 	}
 }
 
@@ -231,7 +226,6 @@
 	struct kse *ke;
 
 	mtx_assert(&sched_lock, MA_OWNED);
-	thread_sanity_check(td);
 	KASSERT ((td->td_state == TDS_RUNQ),
 		("remrunqueue: Bad state on run queue"));
 	kg = td->td_ksegrp;
@@ -282,19 +276,15 @@
 				    TAILQ_PREV(td, threadqueue, td_runq);
 			}
 			runq_remove(&runq, ke);
-KASSERT((ke->ke_kgrlist.tqe_next != ke), ("linked to self!"));
 			KASSERT((ke->ke_state != KES_IDLE),
 			    ("kse already idle"));
 			ke->ke_state = KES_IDLE;
 			ke->ke_thread = NULL;
-KASSERT((TAILQ_FIRST(&kg->kg_iq) != ke), ("really bad screwup"));
 			TAILQ_INSERT_HEAD(&kg->kg_iq, ke, ke_kgrlist);
 			kg->kg_idle_kses++;
-KASSERT((ke->ke_kgrlist.tqe_next != ke), ("linked to self2!"));
 		}
 	}
 	TAILQ_REMOVE(&kg->kg_runq, td, td_runq);
-	thread_sanity_check(td);
 }
 
 #if 1 /* use the first version */
@@ -309,7 +299,6 @@
 
 	CTR1(KTR_RUNQ, "setrunqueue: td%p", td);
 	mtx_assert(&sched_lock, MA_OWNED);
-	thread_sanity_check(td);
 	KASSERT((td->td_state != TDS_RUNQ), ("setrunqueue: bad thread state"));
 	td->td_state = TDS_RUNQ;
 	kg = td->td_ksegrp;
@@ -342,11 +331,9 @@
 			 * There is a free one so it's ours for the asking..
 			 */
 			ke = TAILQ_FIRST(&kg->kg_iq);
-KASSERT((ke->ke_kgrlist.tqe_next != ke), ("linked to self3!"));
 			TAILQ_REMOVE(&kg->kg_iq, ke, ke_kgrlist);
 			ke->ke_state = KES_UNQUEUED;
 			kg->kg_idle_kses--;
-KASSERT((ke->ke_kgrlist.tqe_next != ke), ("linked to self4!"));
 		} else if (tda && (tda->td_priority > td->td_priority)) {
 			/*
 			 * None free, but there is one we can commandeer.
@@ -357,7 +344,6 @@
 			tda = kg->kg_last_assigned =
 		    	    TAILQ_PREV(tda, threadqueue, td_runq);
 			runq_remove(&runq, ke);
-KASSERT((ke->ke_kgrlist.tqe_next != ke), ("linked to self5!"));
 		}
 	} else {
 		KASSERT(ke->ke_thread == td, ("KSE/thread mismatch"));
@@ -417,7 +403,6 @@
 		}
 		runq_add(&runq, ke);
 	}
-	thread_sanity_check(td);
 }
 
 #else
@@ -504,15 +489,12 @@
 		 * assigned" pointer set to us as well.
 		 */
 		ke = TAILQ_FIRST(&kg->kg_iq);
-KASSERT((ke->ke_kgrlist.tqe_next != ke), ("linked to self!"));
 		TAILQ_REMOVE(&kg->kg_iq, ke, ke_kgrlist);
 		ke->ke_state = KES_UNQUEUED;
 		kg->kg_idle_kses--;
-KASSERT((ke->ke_kgrlist.tqe_next != ke), ("linked to self!"));
 		ke->ke_thread = td;
 		td->td_kse = ke;
 		runq_add(&runq, ke);
-KASSERT((ke->ke_kgrlist.tqe_next != ke), ("linked to self!"));
 		if (TAILQ_NEXT(td, td_runq) == NULL) {
 			kg->kg_last_assigned = td;
 		}
@@ -528,14 +510,12 @@
 		 */
 		td2 = kg->kg_last_assigned;
 		ke = td2->td_kse;
-KASSERT((ke->ke_kgrlist.tqe_next != ke), ("linked to self!"));
 		kg->kg_last_assigned =
 		    TAILQ_PREV(td2, threadqueue, td_runq);
 		td2->td_kse = NULL;
 		td->td_kse = ke;
 		ke->ke_thread = td;
 		runq_readjust(&runq, ke);
-KASSERT((ke->ke_kgrlist.tqe_next != ke), ("linked to self!"));
 	}
 }
 #endif
@@ -716,9 +696,6 @@
 		KASSERT(ke != NULL, ("runq_choose: no proc on busy queue"));
 		CTR3(KTR_RUNQ,
 		    "runq_choose: pri=%d kse=%p rqh=%p", pri, ke, rqh);
-KASSERT(ke->ke_procq.tqe_prev != NULL, ("no prev"));
-if (ke->ke_procq.tqe_next)
-	KASSERT(ke->ke_procq.tqe_next->ke_procq.tqe_prev != NULL, ("no next"));
 		TAILQ_REMOVE(rqh, ke, ke_procq);
 		ke->ke_ksegrp->kg_runq_kses--;
 		if (TAILQ_EMPTY(rqh)) {
@@ -775,6 +752,7 @@
 	}
 }
 
+#if 0
 void
 thread_sanity_check(struct thread *td)
 {
@@ -861,4 +839,5 @@
 #endif
 	}
 }
+#endif
 

==== //depot/projects/pmap/sys/netinet/tcp_subr.c#5 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)tcp_subr.c	8.2 (Berkeley) 5/24/95
- * $FreeBSD: src/sys/netinet/tcp_subr.c,v 1.134 2002/06/30 20:07:21 jesper Exp $
+ * $FreeBSD: src/sys/netinet/tcp_subr.c,v 1.136 2002/07/11 23:18:43 truckman Exp $
  */
 
 #include "opt_compat.h"
@@ -931,24 +931,23 @@
 	if (inp == NULL) {
 		error = ENOENT;
 		goto outunlocked;
-	} else {
-		INP_LOCK(inp);
-		if (inp->inp_socket == NULL) {
-			error = ENOENT;
-			goto out;
-		}
+	}
+	INP_LOCK(inp);
+	if (inp->inp_socket == NULL) {
+		error = ENOENT;
+		goto out;
 	}
-
 	error = cr_canseesocket(req->td->td_ucred, inp->inp_socket);
 	if (error)
 		goto out;
 	cru2x(inp->inp_socket->so_cred, &xuc);
-	error = SYSCTL_OUT(req, &xuc, sizeof(struct xucred));
 out:
 	INP_UNLOCK(inp);
 outunlocked:
 	INP_INFO_RUNLOCK(&tcbinfo);
 	splx(s);
+	if (error == 0)
+		error = SYSCTL_OUT(req, &xuc, sizeof(struct xucred));
 	return (error);
 }
 
@@ -994,23 +993,23 @@
 	if (inp == NULL) {
 		error = ENOENT;
 		goto outunlocked;
-	} else {
-		INP_LOCK(inp);
-		if (inp->inp_socket == NULL) {
-			error = ENOENT;
-			goto out;
-		}
+	}
+	INP_LOCK(inp);
+	if (inp->inp_socket == NULL) {
+		error = ENOENT;
+		goto out;
 	}
 	error = cr_canseesocket(req->td->td_ucred, inp->inp_socket);
 	if (error)
 		goto out;
 	cru2x(inp->inp_socket->so_cred, &xuc);
-	error = SYSCTL_OUT(req, &xuc, sizeof(struct xucred));
 out:
 	INP_UNLOCK(inp);
 outunlocked:
 	INP_INFO_RUNLOCK(&tcbinfo);
 	splx(s);
+	if (error == 0)
+		error = SYSCTL_OUT(req, &xuc, sizeof(struct xucred));
 	return (error);
 }
 

==== //depot/projects/pmap/sys/netinet/udp_usrreq.c#4 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)udp_usrreq.c	8.6 (Berkeley) 5/23/95
- * $FreeBSD: src/sys/netinet/udp_usrreq.c,v 1.114 2002/06/21 22:54:16 hsu Exp $
+ * $FreeBSD: src/sys/netinet/udp_usrreq.c,v 1.115 2002/07/11 23:18:43 truckman Exp $
  */
 
 #include "opt_ipsec.h"
@@ -689,10 +689,11 @@
 	if (error)
 		goto out;
 	cru2x(inp->inp_socket->so_cred, &xuc);
-	error = SYSCTL_OUT(req, &xuc, sizeof(struct xucred));
 out:
 	INP_INFO_RUNLOCK(&udbinfo);
 	splx(s);
+	if (error == 0)
+		error = SYSCTL_OUT(req, &xuc, sizeof(struct xucred));
 	return (error);
 }
 

==== //depot/projects/pmap/sys/nfsclient/nfs_bio.c#6 (text+ko) ====

@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_bio.c,v 1.109 2002/07/10 17:02:31 dillon Exp $");
+__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_bio.c,v 1.110 2002/07/11 17:54:58 dillon Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1025,9 +1025,9 @@
 
 	if (nmp->nm_flag & NFSMNT_INT) {
 		bp = getblk(vp, bn, size, PCATCH, 0);
-		while (bp == (struct buf *)0) {
-			if (nfs_sigintr(nmp, (struct nfsreq *)0, td))
-				return ((struct buf *)0);
+		while (bp == NULL) {
+			if (nfs_sigintr(nmp, NULL, td))
+				return (NULL);
 			bp = getblk(vp, bn, size, 0, 2 * hz);
 		}
 	} else {
@@ -1076,7 +1076,7 @@
 		error = tsleep((caddr_t)&np->n_flag, PRIBIO + 2, "nfsvinval",
 			slptimeo);
 		if (error && intrflg &&
-		    nfs_sigintr(nmp, (struct nfsreq *)0, td))
+		    nfs_sigintr(nmp, NULL, td))
 			return (EINTR);
 	}
 
@@ -1087,7 +1087,7 @@
 	error = vinvalbuf(vp, flags, cred, td, slpflag, 0);
 	while (error) {
 		if (intrflg &&
-		    nfs_sigintr(nmp, (struct nfsreq *)0, td)) {
+		    nfs_sigintr(nmp, NULL, td)) {
 			np->n_flag &= ~NFLUSHINPROG;
 			if (np->n_flag & NFLUSHWANT) {
 				np->n_flag &= ~NFLUSHWANT;
@@ -1165,7 +1165,7 @@
 		 */
 		NFS_DPF(ASYNCIO, ("nfs_asyncio: waking iod %d for mount %p\n",
 		    iod, nmp));
-		nfs_iodwant[iod] = (struct proc *)0;
+		nfs_iodwant[iod] = NULL;
 		nfs_iodmount[iod] = nmp;
 		nmp->nm_bufqiods++;
 		wakeup((caddr_t)&nfs_iodwant[iod]);

==== //depot/projects/pmap/sys/nfsclient/nfs_nfsiod.c#3 (text+ko) ====

@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_nfsiod.c,v 1.74 2002/01/15 20:57:21 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_nfsiod.c,v 1.75 2002/07/11 17:54:58 dillon Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -258,9 +258,9 @@
 		    wakeup(&nmp->nm_bufq);
 		}
 		if (bp->b_iocmd == BIO_READ)
-		    (void) nfs_doio(bp, bp->b_rcred, (struct thread *)0);
+		    (void) nfs_doio(bp, bp->b_rcred, NULL);
 		else
-		    (void) nfs_doio(bp, bp->b_wcred, (struct thread *)0);
+		    (void) nfs_doio(bp, bp->b_wcred, NULL);
 		/*
 		 * If there are more than one iod on this mount, then defect
 		 * so that the iods can be shared out fairly between the mounts

==== //depot/projects/pmap/sys/nfsclient/nfs_node.c#3 (text+ko) ====

@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_node.c,v 1.54 2002/04/27 22:10:16 iedowse Exp $");
+__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_node.c,v 1.55 2002/07/11 17:54:58 dillon Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -285,9 +285,9 @@
 		vprint("nfs_inactive: pushing active", ap->a_vp);
 	if (ap->a_vp->v_type != VDIR) {
 		sp = np->n_sillyrename;
-		np->n_sillyrename = (struct sillyrename *)0;
+		np->n_sillyrename = NULL;
 	} else
-		sp = (struct sillyrename *)0;
+		sp = NULL;
 	if (sp) {
 		/*
 		 * We need a reference to keep the vnode from being
@@ -354,6 +354,6 @@
 
 	cache_purge(vp);
 	uma_zfree(nfsnode_zone, vp->v_data);
-	vp->v_data = (void *)0;
+	vp->v_data = NULL;
 	return (0);
 }

==== //depot/projects/pmap/sys/nfsclient/nfs_socket.c#5 (text+ko) ====

@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_socket.c,v 1.82 2002/06/28 21:53:08 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_socket.c,v 1.83 2002/07/11 17:54:58 dillon Exp $");
 
 /*
  * Socket operations for use by nfs
@@ -160,7 +160,7 @@
 	struct sockaddr_in *sin;
 	struct thread *td = &thread0; /* only used for socreate and sobind */
 
-	nmp->nm_so = (struct socket *)0;
+	nmp->nm_so = NULL;
 	saddr = nmp->nm_nam;
 	error = socreate(saddr->sa_family, &nmp->nm_so, nmp->nm_sotype,
 		nmp->nm_soproto, nmp->nm_cred, td);
@@ -367,7 +367,7 @@
 
 	if (nmp->nm_so) {
 		so = nmp->nm_so;
-		nmp->nm_so = (struct socket *)0;
+		nmp->nm_so = NULL;
 		soshutdown(so, 2);
 		soclose(so);
 	}
@@ -414,7 +414,7 @@
 	soflags = rep->r_nmp->nm_soflags;
 
 	if ((soflags & PR_CONNREQUIRED) || (so->so_state & SS_ISCONNECTED))
-		sendnam = (struct sockaddr *)0;
+		sendnam = NULL;
 	else
 		sendnam = nam;
 	if (so->so_type == SOCK_SEQPACKET)
@@ -475,8 +475,8 @@
 	/*
 	 * Set up arguments for soreceive()
 	 */
-	*mp = (struct mbuf *)0;
-	*aname = (struct sockaddr *)0;
+	*mp = NULL;
+	*aname = NULL;
 	sotype = rep->r_nmp->nm_sotype;
 
 	/*
@@ -541,9 +541,7 @@
 			do {
 			   rcvflg = MSG_WAITALL;
 			   error = so->so_proto->pr_usrreqs->pru_soreceive
-				   (so, (struct sockaddr **)0, &auio,
-				    (struct mbuf **)0, (struct mbuf **)0,
-				    &rcvflg);
+				   (so, NULL, &auio, NULL, NULL, &rcvflg);
 			   if (error == EWOULDBLOCK && rep) {
 				if (rep->r_flags & R_SOFTTERM)
 					return (EINTR);
@@ -583,8 +581,8 @@
 			do {
 			    rcvflg = MSG_WAITALL;
 			    error =  so->so_proto->pr_usrreqs->pru_soreceive
-				    (so, (struct sockaddr **)0,
-				     &auio, mp, (struct mbuf **)0, &rcvflg);
+				    (so, NULL,
+				     &auio, mp, NULL, &rcvflg);
 			} while (error == EWOULDBLOCK || error == EINTR ||
 				 error == ERESTART);
 			if (!error && auio.uio_resid > 0) {
@@ -609,7 +607,7 @@
 			do {
 			    rcvflg = 0;
 			    error =  so->so_proto->pr_usrreqs->pru_soreceive
-				    (so, (struct sockaddr **)0,
+				    (so, NULL,
 				&auio, mp, &control, &rcvflg);
 			    if (control)
 				m_freem(control);
@@ -628,7 +626,7 @@
 errout:
 		if (error && error != EINTR && error != ERESTART) {
 			m_freem(*mp);
-			*mp = (struct mbuf *)0;
+			*mp = NULL;
 			if (error != EPIPE)
 				log(LOG_INFO,
 				    "receive error %d from nfs server %s\n",
@@ -646,7 +644,7 @@
 		if ((so = rep->r_nmp->nm_so) == NULL)
 			return (EACCES);
 		if (so->so_state & SS_ISCONNECTED)
-			getnam = (struct sockaddr **)0;
+			getnam = NULL;
 		else
 			getnam = aname;
 		auio.uio_resid = len = 1000000;
@@ -655,7 +653,7 @@
 			rcvflg = 0;
 			error =  so->so_proto->pr_usrreqs->pru_soreceive
 				(so, getnam, &auio, mp,
-				(struct mbuf **)0, &rcvflg);
+				NULL, &rcvflg);
 			if (error == EWOULDBLOCK &&
 			    (rep->r_flags & R_SOFTTERM))
 				return (EINTR);
@@ -664,7 +662,7 @@
 	}
 	if (error) {
 		m_freem(*mp);
-		*mp = (struct mbuf *)0;
+		*mp = NULL;
 	}
 	/*
 	 * Search for any mbufs that are not a multiple of 4 bytes long
@@ -1130,12 +1128,10 @@
 		   (m = m_copym(rep->r_mreq, 0, M_COPYALL, M_DONTWAIT))){
 			if ((nmp->nm_flag & NFSMNT_NOCONN) == 0)
 			    error = (*so->so_proto->pr_usrreqs->pru_send)
-				    (so, 0, m, (struct sockaddr *)0,
-				     (struct mbuf *)0, td);
+				    (so, 0, m, NULL, NULL, td);
 			else
 			    error = (*so->so_proto->pr_usrreqs->pru_send)
-				    (so, 0, m, nmp->nm_nam, (struct mbuf *)0,
-				     td);
+				    (so, 0, m, nmp->nm_nam, NULL, td);
 			if (error) {
 				if (NFSIGNORE_SOERROR(nmp->nm_soflags, error))
 					so->so_error = 0;
@@ -1162,7 +1158,7 @@
 		}
 	}
 	splx(s);
-	nfs_timer_handle = timeout(nfs_timer, (void *)0, nfs_ticks);
+	nfs_timer_handle = timeout(nfs_timer, NULL, nfs_ticks);
 }
 
 /*
@@ -1265,7 +1261,7 @@
 		if (rep->r_nmp->nm_flag & NFSMNT_INT)
 			slpflag = PCATCH;
 	} else
-		td = (struct thread *)0;
+		td = NULL;
 	while (*statep & NFSSTA_SNDLOCK) {
 		if (nfs_sigintr(rep->r_nmp, rep, td))
 			return (EINTR);

==== //depot/projects/pmap/sys/nfsclient/nfs_subs.c#3 (text+ko) ====

@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_subs.c,v 1.112 2002/03/20 10:07:52 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_subs.c,v 1.113 2002/07/11 17:54:58 dillon Exp $");
 
 /*
  * These functions support the macros and help fiddle mbuf chains for
@@ -233,7 +233,7 @@
 	*tl = 0;
 	mb->m_next = mrest;
 	mreq->m_pkthdr.len = authsiz + 10 * NFSX_UNSIGNED + mrest_len;
-	mreq->m_pkthdr.rcvif = (struct ifnet *)0;
+	mreq->m_pkthdr.rcvif = NULL;
 	*mbp = mb;
 	return (mreq);
 }
@@ -406,8 +406,8 @@
 		nfs_ticks = 1;
 	/* Ensure async daemons disabled */
 	for (i = 0; i < NFS_MAXASYNCDAEMON; i++) {
-		nfs_iodwant[i] = (struct proc *)0;
-		nfs_iodmount[i] = (struct nfsmount *)0;
+		nfs_iodwant[i] = NULL;
+		nfs_iodmount[i] = NULL;
 	}
 	nfs_nhinit();			/* Init the nfsnode table */
 
@@ -719,14 +719,14 @@
 			dp->ndm_eocookie = 0;
 			LIST_INSERT_HEAD(&np->n_cookies, dp, ndm_list);
 		} else
-			return ((nfsuint64 *)0);
+			return (NULL);
 	}
 	while (pos >= NFSNUMCOOKIES) {
 		pos -= NFSNUMCOOKIES;
 		if (LIST_NEXT(dp, ndm_list)) {
 			if (!add && dp->ndm_eocookie < NFSNUMCOOKIES &&
 				pos >= dp->ndm_eocookie)
-				return ((nfsuint64 *)0);
+				return (NULL);
 			dp = LIST_NEXT(dp, ndm_list);
 		} else if (add) {
 			MALLOC(dp2, struct nfsdmap *, sizeof (struct nfsdmap),
@@ -735,13 +735,13 @@
 			LIST_INSERT_AFTER(dp, dp2, ndm_list);
 			dp = dp2;
 		} else
-			return ((nfsuint64 *)0);
+			return (NULL);
 	}
 	if (pos >= dp->ndm_eocookie) {
 		if (add)
 			dp->ndm_eocookie = pos + 1;
 		else
-			return ((nfsuint64 *)0);
+			return (NULL);
 	}
 	return (&dp->ndm_cookies[pos]);
 }
@@ -848,7 +848,7 @@
 	}
 	if (*f) {
 		ttvp = *v;
-		t1 = nfs_loadattrcache(&ttvp, md, dpos, (struct vattr *)0, 0);
+		t1 = nfs_loadattrcache(&ttvp, md, dpos, NULL, 0);
 		if (t1)
 			return t1;
 		*v = ttvp;
@@ -905,7 +905,7 @@
 		return EBADRPC;
 	*f = fxdr_unsigned(int, *tl);
 	if (*f != 0) {
-		t1 = nfs_loadattrcache(&ttvp, md, dpos, (struct vattr *)0, 1);
+		t1 = nfs_loadattrcache(&ttvp, md, dpos, NULL, 1);
 		if (t1 != 0) {
 			*f = 0;
 			return t1;

==== //depot/projects/pmap/sys/nfsclient/nfs_vfsops.c#4 (text+ko) ====

@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_vfsops.c,v 1.118 2002/05/16 21:28:20 trhodes Exp $");
+__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_vfsops.c,v 1.119 2002/07/11 17:54:58 dillon Exp $");
 
 #include "opt_bootp.h"
 
@@ -246,7 +246,7 @@
 	u_quad_t tquad;
 
 #ifndef nolint
-	sfp = (struct nfs_statfs *)0;
+	sfp = NULL;
 #endif
 	error = nfs_nget(mp, (nfsfh_t *)nmp->nm_fh, nmp->nm_fhsize, &np);
 	if (error)
@@ -452,7 +452,7 @@
 		error = rtrequest(RTM_ADD, (struct sockaddr *)&sin,
 		    (struct sockaddr *)&nd->mygateway,
 		    (struct sockaddr *)&mask,
-		    RTF_UP | RTF_GATEWAY, (struct rtentry **)0);
+		    RTF_UP | RTF_GATEWAY, NULL);
 		if (error)
 			panic("nfs_mountroot: RTM_ADD: %d", error);
 	}
@@ -697,7 +697,7 @@
 	if (nmp->nm_so && adjsock) {
 		nfs_safedisconnect(nmp);
 		if (nmp->nm_sotype == SOCK_DGRAM)
-			while (nfs_connect(nmp, (struct nfsreq *)0)) {
+			while (nfs_connect(nmp, NULL)) {
 				printf("nfs_args: retrying connect\n");
 				(void) tsleep((caddr_t)&lbolt,
 					      PSOCK, "nfscon", 0);
@@ -850,7 +850,7 @@
 	 * the first request, in case the server is not responding.
 	 */
 	if (nmp->nm_sotype == SOCK_DGRAM &&
-		(error = nfs_connect(nmp, (struct nfsreq *)0)))
+		(error = nfs_connect(nmp, NULL)))
 		goto bad;
 
 	/*

==== //depot/projects/pmap/sys/nfsclient/nfs_vnops.c#4 (text+ko) ====

@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_vnops.c,v 1.183 2002/06/28 21:53:08 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_vnops.c,v 1.184 2002/07/11 17:54:58 dillon Exp $");
 
 /*
  * vnode op calls for Sun NFS version 2 and 3
@@ -727,7 +727,7 @@
 	if (v3) {
 		nfsm_wcc_data(vp, wccflag);
 	} else
-		nfsm_loadattr(vp, (struct vattr *)0);
+		nfsm_loadattr(vp, NULL);
 	m_freem(mrep);
 nfsmout:
 	return (error);
@@ -865,7 +865,7 @@
 			nfsm_postop_attr(newvp, attrflag);
 			nfsm_postop_attr(dvp, attrflag);
 		} else
-			nfsm_loadattr(newvp, (struct vattr *)0);
+			nfsm_loadattr(newvp, NULL);
 		*vpp = newvp;
 		m_freem(mrep);
 		cnp->cn_flags |= SAVENAME;
@@ -912,7 +912,7 @@
 		nfsm_postop_attr(newvp, attrflag);
 		nfsm_postop_attr(dvp, attrflag);
 	} else
-		nfsm_loadattr(newvp, (struct vattr *)0);
+		nfsm_loadattr(newvp, NULL);
 	if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN))
 		cnp->cn_flags |= SAVENAME;
 	if ((cnp->cn_flags & MAKEENTRY) &&
@@ -1053,7 +1053,7 @@
 			tl = nfsm_dissect(u_int32_t *, 2 * NFSX_UNSIGNED);
 			eof = fxdr_unsigned(int, *(tl + 1));
 		} else
-			nfsm_loadattr(vp, (struct vattr *)0);
+			nfsm_loadattr(vp, NULL);
 		nfsm_strsiz(retlen, nmp->nm_rsize);
 		nfsm_mtouio(uiop, retlen);
 		m_freem(mrep);
@@ -1164,7 +1164,7 @@
 				}
 			}
 		} else
-		    nfsm_loadattr(vp, (struct vattr *)0);
+		    nfsm_loadattr(vp, NULL);
 		if (wccflag)
 		    VTONFS(vp)->n_mtime = VTONFS(vp)->n_vattr.va_mtime.tv_sec;
 		m_freem(mrep);
@@ -1192,8 +1192,8 @@
 {
 	struct nfsv2_sattr *sp;
 	u_int32_t *tl;
-	struct vnode *newvp = (struct vnode *)0;
-	struct nfsnode *np = (struct nfsnode *)0;
+	struct vnode *newvp = NULL;
+	struct nfsnode *np = NULL;
 	struct vattr vattr;
 	caddr_t bpos, dpos;
 	int error = 0, wccflag = NFSV3_WCCRATTR, gotvp = 0;
@@ -1242,7 +1242,7 @@
 		if (!gotvp) {
 			if (newvp) {
 				vput(newvp);
-				newvp = (struct vnode *)0;
+				newvp = NULL;
 			}
 			error = nfs_lookitup(dvp, cnp->cn_nameptr,
 			    cnp->cn_namelen, cnp->cn_cred, cnp->cn_thread, &np);
@@ -1292,8 +1292,8 @@
 	struct componentname *cnp = ap->a_cnp;
 	struct nfsv2_sattr *sp;
 	u_int32_t *tl;
-	struct nfsnode *np = (struct nfsnode *)0;
-	struct vnode *newvp = (struct vnode *)0;
+	struct nfsnode *np = NULL;
+	struct vnode *newvp = NULL;
 	caddr_t bpos, dpos;
 	int error = 0, wccflag = NFSV3_WCCRATTR, gotvp = 0, fmode = 0;
 	struct mbuf *mreq, *mrep, *md, *mb;
@@ -1350,7 +1350,7 @@
 		if (!gotvp) {
 			if (newvp) {
 				vput(newvp);
-				newvp = (struct vnode *)0;
+				newvp = NULL;
 			}
 			error = nfs_lookitup(dvp, cnp->cn_nameptr,
 			    cnp->cn_namelen, cnp->cn_cred, cnp->cn_thread, &np);
@@ -1466,7 +1466,7 @@
 {
 
 	return (nfs_removerpc(sp->s_dvp, sp->s_name, sp->s_namlen, sp->s_cred,
-		(struct thread *)0));
+		NULL));
 }
 
 /*
@@ -1694,7 +1694,7 @@
 	caddr_t bpos, dpos;
 	int slen, error = 0, wccflag = NFSV3_WCCRATTR, gotvp;
 	struct mbuf *mreq, *mrep, *md, *mb;
-	struct vnode *newvp = (struct vnode *)0;
+	struct vnode *newvp = NULL;
 	int v3 = NFS_ISV3(dvp);
 
 	nfsstats.rpccnt[NFSPROC_SYMLINK]++;
@@ -1784,8 +1784,8 @@
 	struct componentname *cnp = ap->a_cnp;
 	struct nfsv2_sattr *sp;
 	int len;
-	struct nfsnode *np = (struct nfsnode *)0;
-	struct vnode *newvp = (struct vnode *)0;
+	struct nfsnode *np = NULL;
+	struct vnode *newvp = NULL;
 	caddr_t bpos, dpos;
 	int error = 0, wccflag = NFSV3_WCCRATTR;
 	int gotvp = 0;
@@ -1832,7 +1832,7 @@
 	if (error == EEXIST || (!error && !gotvp)) {
 		if (newvp) {
 			vrele(newvp);

>>> TRUNCATED FOR MAIL (1000 lines) <<<

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




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