diff options
author | scottl <scottl@FreeBSD.org> | 2007-06-16 18:20:29 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2007-06-16 18:20:29 +0000 |
commit | 27c7d997c38a4731719f84a0ebd63fc9878571d9 (patch) | |
tree | 051fe28b6c643ef5f240a91341a5632d120c18f7 /sys/cam | |
parent | 7096f072a5682902ee09013f8f6b87f9ccefce73 (diff) | |
download | FreeBSD-src-27c7d997c38a4731719f84a0ebd63fc9878571d9.zip FreeBSD-src-27c7d997c38a4731719f84a0ebd63fc9878571d9.tar.gz |
Work around the other uses of M_WAITOK.
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/scsi/scsi_da.c | 3 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_sa.c | 12 |
2 files changed, 11 insertions, 4 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 6b0793b..8b79dcf 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -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. diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c index 684a104..617535a 100644 --- a/sys/cam/scsi/scsi_sa.c +++ b/sys/cam/scsi/scsi_sa.c @@ -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]; |