Re: [PATCH] Use test_and_clear_bit() instead atomic_dec_and_test()for stop_machine

From: Steven Rostedt
Date: Wed May 23 2012 - 04:43:25 EST


On Wed, 2012-05-23 at 13:19 +0900, OGAWA Hirofumi wrote:
> OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
>
>
> stop_machine_first is just to see if it is first one or not. In this
> usage, atomic_dec_and_test() makes value less than 0.
>
> I think it is not desirable, because it only triggers
> atomic_dec_and_test() less than 0 debug patch. (the patch tests result
> of atomic_dec_and_test() is < 0)
>
> So, this uses atomic_xchg() instead.

Acked-by: Steven Rostedt <rostedt@xxxxxxxxxxx>

-- Steve

>
> Signed-off-by: OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/