diff options
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 792a384a8e35..b2d0fcd8f87f 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -855,7 +855,7 @@ retry: | |||
855 | */ | 855 | */ |
856 | if (!ioc && !retried) { | 856 | if (!ioc && !retried) { |
857 | spin_unlock_irq(q->queue_lock); | 857 | spin_unlock_irq(q->queue_lock); |
858 | create_io_context(current, gfp_mask, q->node); | 858 | create_io_context(gfp_mask, q->node); |
859 | spin_lock_irq(q->queue_lock); | 859 | spin_lock_irq(q->queue_lock); |
860 | retried = true; | 860 | retried = true; |
861 | goto retry; | 861 | goto retry; |
@@ -919,7 +919,9 @@ retry: | |||
919 | 919 | ||
920 | /* create icq if missing */ | 920 | /* create icq if missing */ |
921 | if ((rw_flags & REQ_ELVPRIV) && unlikely(et->icq_cache && !icq)) { | 921 | if ((rw_flags & REQ_ELVPRIV) && unlikely(et->icq_cache && !icq)) { |
922 | icq = ioc_create_icq(q, gfp_mask); | 922 | ioc = create_io_context(gfp_mask, q->node); |
923 | if (ioc) | ||
924 | icq = ioc_create_icq(ioc, q, gfp_mask); | ||
923 | if (!icq) | 925 | if (!icq) |
924 | goto fail_alloc; | 926 | goto fail_alloc; |
925 | } | 927 | } |
@@ -1005,7 +1007,7 @@ static struct request *get_request_wait(struct request_queue *q, int rw_flags, | |||
1005 | * up to a big batch of them for a small period time. | 1007 | * up to a big batch of them for a small period time. |
1006 | * See ioc_batching, ioc_set_batching | 1008 | * See ioc_batching, ioc_set_batching |
1007 | */ | 1009 | */ |
1008 | create_io_context(current, GFP_NOIO, q->node); | 1010 | create_io_context(GFP_NOIO, q->node); |
1009 | ioc_set_batching(q, current->io_context); | 1011 | ioc_set_batching(q, current->io_context); |
1010 | 1012 | ||
1011 | spin_lock_irq(q->queue_lock); | 1013 | spin_lock_irq(q->queue_lock); |