03.06.2011 11:01, Michael Tokarev wrote:
> commit 2e8532e0a9ee1d25b279ac78ee8ce31701e2aa15
> Author: Michael Tokarev <[email protected]>
> Date:   Fri Jun 3 10:50:49 2011 +0400
> 
>     block: add proper state guards to elv_queue_empty()
> 
>     Like in 0a58e077eb600d1efd7e54ad9926a75a39d7f8ae (backported to
>     stable 2.6.38 as 0a58e077eb600d1efd7e54ad9926a75a39d7f8ae) which
>     fixes this for __elv_next_request(), as reported by Atsushi Nemoto,
>     elv_queue_empty() also needs to check for dead queue condition
>     before touchin elevator.
> 
>     elv_queue_empty() has been removed upstream so this is only applicable
>     for versions prior to 2.6.39, including 2.6.32-longterm.

Um, i'm not sure about this one -- 2.6.32 does not have
other pieces of this puzzle (and 2.6.38.8 was the last
in the 2.6.38.y series).

/mjt

>     Signed-Off-By: Michael Tokarev <[email protected]>
> 
> diff --git a/block/elevator.c b/block/elevator.c
> index 236e93c..30cec25 100644
> --- a/block/elevator.c
> +++ b/block/elevator.c
> @@ -727,7 +727,8 @@ int elv_queue_empty(struct request_queue *q)
>       if (!list_empty(&q->queue_head))
>               return 0;
> 
> -     if (e->ops->elevator_queue_empty_fn)
> +     if (!test_bit(QUEUE_FLAG_DEAD, &q->queue_flags) &&
> +         e->ops->elevator_queue_empty_fn)
>               return e->ops->elevator_queue_empty_fn(q);
> 
>       return 1;

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to