Re: [patch 5/5] futex: Cleanup the goto confusion in requeue_pi()

From: Darren Hart
Date: Sun Dec 20 2015 - 00:46:40 EST


On Sat, Dec 19, 2015 at 09:15:24PM -0800, Darren Hart wrote:
>
> As a follow-on, I think it might be worthwhile to create a symmetrical
> get_pi_state() to the put_pi_state(), rather than handling the atomic_inc
> directly.
>
> And finally, while the break; in futex_requeue works, that function is quite
> long and an explicit out_put_pi_state: label would make the intention clear and
> also avoid inadvertently breaking the implicit behavior of the break.
>

And while prototyping these changes, I've changed my mind, neither is a
worthwhile change.

The plist_for_each in futex_requeue really isn't that long and the breaks occur
in a logical way and are now well documented with this series. An inadvertent
change to this behavior seems unlikely.

There is only one open coded atomic_inc in futex.c for the pi_state refcount,
hardly worth a wrapper.

Regards,

--
Darren Hart
Intel Open Source Technology Center
--
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/