Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287550
b: refs/heads/master
c: 05c30b9
h: refs/heads/master
v: v3
  • Loading branch information
Shaohua Li authored and Jens Axboe committed Jan 19, 2012
1 parent 3820d95 commit 95c9e91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: df0793abb929e66606fa25f3875ff1b89de5ad32
refs/heads/master: 05c30b9551f1904d9950ad0d28e65fc4ff3c8a8e
10 changes: 6 additions & 4 deletions trunk/block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -872,13 +872,15 @@ static struct request *get_request(struct request_queue *q, int rw_flags,
spin_unlock_irq(q->queue_lock);

/* create icq if missing */
if (unlikely(et->icq_cache && !icq))
if ((rw_flags & REQ_ELVPRIV) && unlikely(et->icq_cache && !icq)) {
icq = ioc_create_icq(q, gfp_mask);
if (!icq)
goto fail_icq;
}

/* rqs are guaranteed to have icq on elv_set_request() if requested */
if (likely(!et->icq_cache || icq))
rq = blk_alloc_request(q, icq, rw_flags, gfp_mask);
rq = blk_alloc_request(q, icq, rw_flags, gfp_mask);

fail_icq:
if (unlikely(!rq)) {
/*
* Allocation failed presumably due to memory. Undo anything
Expand Down

0 comments on commit 95c9e91

Please sign in to comment.