ucounts: Add get_ucounts_or_wrap for clarity
authorEric W. Biederman <ebiederm@xmission.com>
Sat, 16 Oct 2021 19:05:34 +0000 (14:05 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 20 Oct 2021 15:45:34 +0000 (10:45 -0500)
commitda70d3109e74adf6ae9f8d1f6c7c0c9735d314ba
treedd7eb1eef0114f31f39de85906ad9ebae955fe37
parent5fc9e37cd5ae762b856912cdedb226a884b3c3e0
ucounts: Add get_ucounts_or_wrap for clarity

Add a helper function get_ucounts_or_wrap that is a trivial
wrapper around atomic_add_negative, that makes it clear
how atomic_add_negative is used in the context of ucounts.

Link: https://lkml.kernel.org/r/87pms2qkr9.fsf_-_@disp2133
Tested-by: Yu Zhao <yuzhao@google.com>
Reviewed-by: Alexey Gladkov <legion@kernel.org>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
kernel/ucount.c