Convert GIANT_REQUIRED to NET_ASSERT_GIANT where Giant is used to
protect socket operations. Leave one "as-is" as it also frobs rootvp.
This commit is contained in:
parent
d82b0bb246
commit
65f0bd9a10
@ -591,7 +591,7 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td)
|
||||
int retry;
|
||||
const char *s;
|
||||
|
||||
GIANT_REQUIRED; /* XXX until socket locking done */
|
||||
NET_ASSERT_GIANT();
|
||||
|
||||
/*
|
||||
* Create socket and set its recieve timeout.
|
||||
|
@ -215,7 +215,7 @@ krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func,
|
||||
nam = mhead = NULL;
|
||||
from = NULL;
|
||||
|
||||
GIANT_REQUIRED; /* XXX until socket locking done */
|
||||
NET_ASSERT_GIANT();
|
||||
|
||||
/*
|
||||
* Create socket and set its recieve timeout.
|
||||
|
@ -161,7 +161,7 @@ nfs_connect(struct nfsmount *nmp, struct nfsreq *rep)
|
||||
struct sockaddr *saddr;
|
||||
struct thread *td = &thread0; /* only used for socreate and sobind */
|
||||
|
||||
GIANT_REQUIRED; /* XXX until socket locking done */
|
||||
NET_ASSERT_GIANT();
|
||||
|
||||
nmp->nm_so = NULL;
|
||||
saddr = nmp->nm_nam;
|
||||
@ -379,7 +379,7 @@ nfs_disconnect(struct nfsmount *nmp)
|
||||
{
|
||||
struct socket *so;
|
||||
|
||||
GIANT_REQUIRED; /* XXX until socket locking done */
|
||||
NET_ASSERT_GIANT();
|
||||
|
||||
if (nmp->nm_so) {
|
||||
so = nmp->nm_so;
|
||||
@ -415,7 +415,7 @@ nfs_send(struct socket *so, struct sockaddr *nam, struct mbuf *top,
|
||||
struct sockaddr *sendnam;
|
||||
int error, soflags, flags;
|
||||
|
||||
GIANT_REQUIRED; /* XXX until socket locking done */
|
||||
NET_ASSERT_GIANT();
|
||||
|
||||
KASSERT(rep, ("nfs_send: called with rep == NULL"));
|
||||
|
||||
@ -498,7 +498,7 @@ nfs_receive(struct nfsreq *rep, struct sockaddr **aname, struct mbuf **mp)
|
||||
int error, sotype, rcvflg;
|
||||
struct thread *td = curthread; /* XXX */
|
||||
|
||||
GIANT_REQUIRED; /* XXX until socket locking done */
|
||||
NET_ASSERT_GIANT();
|
||||
|
||||
/*
|
||||
* Set up arguments for soreceive()
|
||||
|
Loading…
Reference in New Issue
Block a user