@@ -2582,7 +2582,7 @@ cfq_merged_requests(struct request_queue *q, struct request *rq,
cfq_del_cfqq_rr(cfqd, cfqq);
}
-static int cfq_allow_bio_merge(struct request_queue *q, struct request *rq,
+static bool cfq_allow_bio_merge(struct request_queue *q, struct request *rq,
struct bio *bio)
{
struct cfq_data *cfqd = q->elevator->elevator_data;
@@ -2608,7 +2608,7 @@ static int cfq_allow_bio_merge(struct request_queue *q, struct request *rq,
return cfqq == RQ_CFQQ(rq);
}
-static int cfq_allow_rq_merge(struct request_queue *q, struct request *rq,
+static bool cfq_allow_rq_merge(struct request_queue *q, struct request *rq,
struct request *next)
{
return RQ_CFQQ(rq) == RQ_CFQQ(next);
@@ -56,7 +56,7 @@ static LIST_HEAD(elv_list);
* Query io scheduler to see if the current process issuing bio may be
* merged with rq.
*/
-static int elv_iosched_allow_bio_merge(struct request *rq, struct bio *bio)
+static bool elv_iosched_allow_bio_merge(struct request *rq, struct bio *bio)
{
struct request_queue *q = rq->q;
struct elevator_queue *e = q->elevator;
@@ -30,10 +30,10 @@ typedef void (elevator_merge_req_fn) (struct request_queue *, struct request *,
typedef void (elevator_merged_fn) (struct request_queue *, struct request *, enum elv_merge);
-typedef int (elevator_allow_bio_merge_fn) (struct request_queue *,
+typedef bool (elevator_allow_bio_merge_fn) (struct request_queue *,
struct request *, struct bio *);
-typedef int (elevator_allow_rq_merge_fn) (struct request_queue *,
+typedef bool (elevator_allow_rq_merge_fn) (struct request_queue *,
struct request *, struct request *);
typedef void (elevator_bio_merged_fn) (struct request_queue *,
Change some functions' return type to bool from int because their checking results could represnt in bool value. Signed-off-by: Chengguang Xu <cgxu519@gmx.com> --- block/cfq-iosched.c | 4 ++-- block/elevator.c | 2 +- include/linux/elevator.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)