mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-16 07:04:36 +01:00
firewire: Return SCSI_MLQUEUE_HOST_BUSY for out of memory cases in queuecommand.
Signed-off-by: Kristian Hoegsberg <[email protected]> Signed-off-by: Stefan Richter <[email protected]>
This commit is contained in:
1 parent
95ffc5e314
commit
e1b68c4dcf
1 file changed
+4
-4
@@ -1017,7 +1017,9 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
|
||||
*/
|
||||
if (cmd->sc_data_direction == DMA_BIDIRECTIONAL) {
|
||||
fw_error("Cannot handle DMA_BIDIRECTIONAL - rejecting command");
|
||||
goto fail_alloc;
|
||||
cmd->result = DID_ERROR << 16;
|
||||
done(cmd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
orb = kzalloc(sizeof *orb, GFP_ATOMIC);
|
||||
@@ -1093,9 +1095,7 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
|
||||
fail_mapping:
|
||||
kfree(orb);
|
||||
fail_alloc:
|
||||
cmd->result = DID_ERROR << 16;
|
||||
done(cmd);
|
||||
return 0;
|
||||
return SCSI_MLQUEUE_HOST_BUSY;
|
||||
}
|
||||
|
||||
static int sbp2_scsi_slave_alloc(struct scsi_device *sdev)
|
||||
|
||||
Reference in new issue
Block a user