Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148088
b: refs/heads/master
c: 91bc31f
h: refs/heads/master
v: v3
  • Loading branch information
James Bottomley authored and James Bottomley committed Jun 8, 2009
1 parent c3a7729 commit cd45ea6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 477e608c03eb2f561a23994bee38a32a9fd3357d
refs/heads/master: 91bc31fb3bae4e55832c7c39d4f9c193285e6ab2
17 changes: 5 additions & 12 deletions trunk/drivers/scsi/scsi_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -1451,28 +1451,21 @@ static void eh_lock_door_done(struct request *req, int uptodate)
* @sdev: SCSI device to prevent medium removal
*
* Locking:
* We must be called from process context; scsi_allocate_request()
* may sleep.
* We must be called from process context.
*
* Notes:
* We queue up an asynchronous "ALLOW MEDIUM REMOVAL" request on the
* head of the devices request queue, and continue.
*
* Bugs:
* scsi_allocate_request() may sleep waiting for existing requests to
* be processed. However, since we haven't kicked off any request
* processing for this host, this may deadlock.
*
* If scsi_allocate_request() fails for what ever reason, we
* completely forget to lock the door.
*/
static void scsi_eh_lock_door(struct scsi_device *sdev)
{
struct request *req;

/*
* blk_get_request with GFP_KERNEL (__GFP_WAIT) sleeps until a
* request becomes available
*/
req = blk_get_request(sdev->request_queue, READ, GFP_KERNEL);
if (!req)
return;

req->cmd[0] = ALLOW_MEDIUM_REMOVAL;
req->cmd[1] = 0;
Expand Down

0 comments on commit cd45ea6

Please sign in to comment.