diff options
author | Kiyoshi Ueda <k-ueda@ct.jp.nec.com> | 2009-12-10 18:52:15 -0500 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2009-12-10 18:52:15 -0500 |
commit | 0888564393a1277ce2d0564d819e1bcff1120343 (patch) | |
tree | cac54095a48b4662ee5a3ff17550693300be2692 /drivers/md/dm.c | |
parent | 598de40947909e6b948569710383661ecc0ddc8e (diff) |
dm: pass gfp_mask to alloc_rq_tio
This patch adds the gfp_mask argument to alloc_rq_tio().
No functional change.
This patch is a preparation for a later patch in this series which needs to
allocate tio (for barrier I/O) with different allocation flag (GFP_NOIO) from
the one in the normal I/O code path.
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index cf0b455b21ef..a42dfb7a718e 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -432,9 +432,10 @@ static void free_tio(struct mapped_device *md, struct dm_target_io *tio) | |||
432 | mempool_free(tio, md->tio_pool); | 432 | mempool_free(tio, md->tio_pool); |
433 | } | 433 | } |
434 | 434 | ||
435 | static struct dm_rq_target_io *alloc_rq_tio(struct mapped_device *md) | 435 | static struct dm_rq_target_io *alloc_rq_tio(struct mapped_device *md, |
436 | gfp_t gfp_mask) | ||
436 | { | 437 | { |
437 | return mempool_alloc(md->tio_pool, GFP_ATOMIC); | 438 | return mempool_alloc(md->tio_pool, gfp_mask); |
438 | } | 439 | } |
439 | 440 | ||
440 | static void free_rq_tio(struct dm_rq_target_io *tio) | 441 | static void free_rq_tio(struct dm_rq_target_io *tio) |
@@ -1471,7 +1472,7 @@ static int dm_prep_fn(struct request_queue *q, struct request *rq) | |||
1471 | return BLKPREP_KILL; | 1472 | return BLKPREP_KILL; |
1472 | } | 1473 | } |
1473 | 1474 | ||
1474 | tio = alloc_rq_tio(md); /* Only one for each original request */ | 1475 | tio = alloc_rq_tio(md, GFP_ATOMIC); |
1475 | if (!tio) | 1476 | if (!tio) |
1476 | /* -ENOMEM */ | 1477 | /* -ENOMEM */ |
1477 | return BLKPREP_DEFER; | 1478 | return BLKPREP_DEFER; |