mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-01 14:14:56 +00:00
p9fs: use M_WAITOK where appropriate
device_attach routines are allowed to sleep, and this routine already
has other M_WAITOK allocations.
Reported by: markj
Reviewed by: markj
Fixes: 1efd69f933
("p9fs: move NULL check immediately after alloc...")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45721
This commit is contained in:
parent
6176883697
commit
e6b88237c6
|
@ -331,12 +331,7 @@ vt9p_attach(device_t dev)
|
|||
/* Initialize the condition variable */
|
||||
cv_init(&chan->submit_cv, "Conditional variable for submit queue" );
|
||||
chan->max_nsegs = MAX_SUPPORTED_SGS;
|
||||
chan->vt9p_sglist = sglist_alloc(chan->max_nsegs, M_NOWAIT);
|
||||
if (chan->vt9p_sglist == NULL) {
|
||||
error = ENOMEM;
|
||||
P9_DEBUG(ERROR, "%s: Cannot allocate sglist\n", __func__);
|
||||
goto out;
|
||||
}
|
||||
chan->vt9p_sglist = sglist_alloc(chan->max_nsegs, M_WAITOK);
|
||||
|
||||
/* Negotiate the features from the host */
|
||||
virtio_set_feature_desc(dev, virtio_9p_feature_desc);
|
||||
|
|
Loading…
Reference in a new issue