[PATCH] __kill_pgrp_info: simplify the calculation of return value

From: Oleg Nesterov
Date: Thu Aug 17 2023 - 11:50:11 EST


On 08/16, Eric W. Biederman wrote:
>
> > We should be consistent and ensure __kill_pgrp_info uses
> > the same code pattern, otherwise it will be difficult to
> > see they use the same logic.

Hmm, agreed.

Then I think we should change __kill_pgrp_info() first, then "copy"
this pattern into kill_something_info() in a separate patch.

> > I think for both patterns the reader of the code is going to have to
> > stop and think about what is going on to understand the logic.

Yes, although to me the current code looks less clear but this is subjective.

But I agree this needs a comment. How about the patch below?