diff --git a/block/test-iosched.c b/block/test-iosched.c index a267e7a31152..9341bc163e95 100644 --- a/block/test-iosched.c +++ b/block/test-iosched.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -311,7 +311,7 @@ struct test_request *test_iosched_create_test_req(int is_err_expcted, return NULL; } - buf_size = sizeof(unsigned int) * BIO_U32_SIZE * num_bios; + buf_size = TEST_BIO_SIZE * num_bios; test_rq->bios_buffer = kzalloc(buf_size, GFP_KERNEL); if (!test_rq->bios_buffer) { pr_err("%s: Failed to allocate the data buf", __func__); diff --git a/include/linux/test-iosched.h b/include/linux/test-iosched.h index 36facf7e4053..47383ae0675c 100644 --- a/include/linux/test-iosched.h +++ b/include/linux/test-iosched.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -28,6 +28,7 @@ #define TEST_PATTERN_FF 0xFFFFFFFF #define TEST_NO_PATTERN 0xDEADBEEF #define BIO_U32_SIZE 1024 +#define TEST_BIO_SIZE PAGE_SIZE /* use one page bios */ struct test_data;