summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/ucount.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/ucount.c b/kernel/ucount.c
index 4dfb83bfc304..3456018730b6 100644
--- a/kernel/ucount.c
+++ b/kernel/ucount.c
@@ -319,7 +319,7 @@ long inc_rlimit_get_ucounts(struct ucounts *ucounts, enum rlimit_type type,
for (iter = ucounts; iter; iter = iter->ns->ucounts) {
long new = atomic_long_add_return(1, &iter->rlimit[type]);
if (new < 0 || new > max)
- goto unwind;
+ goto dec_unwind;
if (iter == ucounts)
ret = new;
if (!override_rlimit)
@@ -337,7 +337,6 @@ long inc_rlimit_get_ucounts(struct ucounts *ucounts, enum rlimit_type type,
dec_unwind:
dec = atomic_long_sub_return(1, &iter->rlimit[type]);
WARN_ON_ONCE(dec < 0);
-unwind:
do_dec_rlimit_put_ucounts(ucounts, iter, type);
return 0;
}