From 8feb59768b5728e57f9c968b24e1448daae4bac2 Mon Sep 17 00:00:00 2001 From: Tanya Brokhman Date: Sun, 22 Jun 2014 16:11:03 +0300 Subject: [PATCH] block: row: Fix crash when adding a new field in bio struct When adding new field to struct bio there is a crash in the removed code lines. This issue was introduced by commit 80a8f0f87bee18283e9ca0a8966ec97ad9f084e5 "block: row-iosched idling triggered by readahead pages" (Partly) reverting this patch till root cause is fixed (on FS level). Change-Id: Ie82bc806ea52a6370b57aa15455c85b2db10d0da Signed-off-by: Tanya Brokhman --- block/row-iosched.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/block/row-iosched.c b/block/row-iosched.c index dfb46b42712..9b397418e51 100644 --- a/block/row-iosched.c +++ b/block/row-iosched.c @@ -1,7 +1,7 @@ /* * ROW (Read Over Write) I/O scheduler. * - * 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 @@ -331,10 +331,6 @@ static void row_add_request(struct request_queue *q, struct row_queue *rqueue = RQ_ROWQ(rq); s64 diff_ms; bool queue_was_empty = list_empty(&rqueue->fifo); - unsigned long bv_page_flags = 0; - - if (rq->bio && rq->bio->bi_io_vec && rq->bio->bi_io_vec->bv_page) - bv_page_flags = rq->bio->bi_io_vec->bv_page->flags; list_add_tail(&rq->queuelist, &rqueue->fifo); rd->nr_reqs[rq_data_dir(rq)]++; @@ -367,9 +363,7 @@ static void row_add_request(struct request_queue *q, rqueue->idle_data.begin_idling = false; return; } - - if ((bv_page_flags & (1L << PG_readahead)) || - (diff_ms < rd->rd_idle_data.freq_ms)) { + if (diff_ms < rd->rd_idle_data.freq_ms) { rqueue->idle_data.begin_idling = true; row_log_rowq(rd, rqueue->prio, "Enable idling"); } else {