mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-01 08:27:59 +00:00
Work around the other uses of M_WAITOK.
This commit is contained in:
parent
ddd8ed26ea
commit
d9fd6daad5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170830
@ -744,8 +744,9 @@ dastrategy(struct bio *bp)
|
||||
|
||||
/*
|
||||
* Place it in the queue of disk activities for this disk
|
||||
*/
|
||||
bioq_disksort(&softc->bio_queue, bp);
|
||||
*/
|
||||
bioq_insert_tail(&softc->bio_queue, bp);
|
||||
|
||||
/*
|
||||
* Schedule ourselves for performing the work.
|
||||
|
@ -1922,7 +1922,7 @@ samount(struct cam_periph *periph, int oflags, struct cdev *dev)
|
||||
* read a full record.
|
||||
*/
|
||||
rblim = (struct scsi_read_block_limits_data *)
|
||||
malloc(8192, M_SCSISA, M_WAITOK);
|
||||
malloc(8192, M_SCSISA, M_NOWAIT);
|
||||
if (rblim == NULL) {
|
||||
xpt_print(periph->path, "no memory for test read\n");
|
||||
xpt_release_ccb(ccb);
|
||||
@ -2728,7 +2728,9 @@ sasetparams(struct cam_periph *periph, sa_params params_to_set,
|
||||
|
||||
softc = (struct sa_softc *)periph->softc;
|
||||
|
||||
ccomp = malloc(sizeof (sa_comp_t), M_SCSISA, M_WAITOK);
|
||||
ccomp = malloc(sizeof (sa_comp_t), M_SCSISA, M_NOWAIT);
|
||||
if (ccomp == NULL)
|
||||
return (ENOMEM);
|
||||
|
||||
/*
|
||||
* Since it doesn't make sense to set the number of blocks, or
|
||||
@ -2751,7 +2753,11 @@ sasetparams(struct cam_periph *periph, sa_params params_to_set,
|
||||
if (params_to_set & SA_PARAM_COMPRESSION)
|
||||
mode_buffer_len += sizeof (sa_comp_t);
|
||||
|
||||
mode_buffer = malloc(mode_buffer_len, M_SCSISA, M_WAITOK | M_ZERO);
|
||||
mode_buffer = malloc(mode_buffer_len, M_SCSISA, M_NOWAIT | M_ZERO);
|
||||
if (mode_buffer == NULL) {
|
||||
free(ccomp, M_SCSISA);
|
||||
return (ENOMEM);
|
||||
}
|
||||
|
||||
mode_hdr = (struct scsi_mode_header_6 *)mode_buffer;
|
||||
mode_blk = (struct scsi_mode_blk_desc *)&mode_hdr[1];
|
||||
|
Loading…
Reference in New Issue
Block a user