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
82d8e6f5a0
commit
9ef2900f9d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130554
@ -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