2004-03-01 21:38:23

by Chen, Kenneth W

[permalink] [raw]
Subject: Redundant unplug_timer deletion

The only path to get to del_timer call in __generic_unplug_device()
is when blk_remove_plug() returns 1, and in that case it already
removed the unplug_timer.

Patch to remove this redundant call.

- Ken

--- linux-2.6.3/drivers/block/ll_rw_blk.c 2004-02-17 19:57:16
+++ linux-2.6.3.blk/drivers/block/ll_rw_blk.c 2004-03-01 13:29:37
@@ -1136,8 +1136,6 @@ static inline void __generic_unplug_devi
if (!blk_remove_plug(q))
return;

- del_timer(&q->unplug_timer);
-
/*
* was plugged, fire request_fn if queue has stuff to do
*/


2004-03-01 22:07:03

by Jens Axboe

[permalink] [raw]
Subject: Re: Redundant unplug_timer deletion

On Mon, Mar 01 2004, Chen, Kenneth W wrote:
> The only path to get to del_timer call in __generic_unplug_device()
> is when blk_remove_plug() returns 1, and in that case it already
> removed the unplug_timer.
>
> Patch to remove this redundant call.
>
> - Ken
>
> --- linux-2.6.3/drivers/block/ll_rw_blk.c 2004-02-17 19:57:16
> +++ linux-2.6.3.blk/drivers/block/ll_rw_blk.c 2004-03-01 13:29:37
> @@ -1136,8 +1136,6 @@ static inline void __generic_unplug_devi
> if (!blk_remove_plug(q))
> return;
>
> - del_timer(&q->unplug_timer);
> -
> /*
> * was plugged, fire request_fn if queue has stuff to do
> */

Patch looks good.

--
Jens Axboe