diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/aio.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1660,6 +1660,7 @@ long do_io_submit(aio_context_t ctx_id, long nr, | |||
1660 | long ret = 0; | 1660 | long ret = 0; |
1661 | int i; | 1661 | int i; |
1662 | struct hlist_head batch_hash[AIO_BATCH_HASH_SIZE] = { { 0, }, }; | 1662 | struct hlist_head batch_hash[AIO_BATCH_HASH_SIZE] = { { 0, }, }; |
1663 | struct blk_plug plug; | ||
1663 | 1664 | ||
1664 | if (unlikely(nr < 0)) | 1665 | if (unlikely(nr < 0)) |
1665 | return -EINVAL; | 1666 | return -EINVAL; |
@@ -1676,6 +1677,8 @@ long do_io_submit(aio_context_t ctx_id, long nr, | |||
1676 | return -EINVAL; | 1677 | return -EINVAL; |
1677 | } | 1678 | } |
1678 | 1679 | ||
1680 | blk_start_plug(&plug); | ||
1681 | |||
1679 | /* | 1682 | /* |
1680 | * AKPM: should this return a partial result if some of the IOs were | 1683 | * AKPM: should this return a partial result if some of the IOs were |
1681 | * successfully submitted? | 1684 | * successfully submitted? |
@@ -1698,6 +1701,7 @@ long do_io_submit(aio_context_t ctx_id, long nr, | |||
1698 | if (ret) | 1701 | if (ret) |
1699 | break; | 1702 | break; |
1700 | } | 1703 | } |
1704 | blk_finish_plug(&plug); | ||
1701 | aio_batch_free(batch_hash); | 1705 | aio_batch_free(batch_hash); |
1702 | 1706 | ||
1703 | put_ioctx(ctx); | 1707 | put_ioctx(ctx); |