[patch 14/38] CKRM e18: undo removal of check in numtasks_put_ref_local
From: Gerrit Huizenga
Date: Thu Jun 23 2005 - 02:58:49 EST
Signed-Off-By: Chandra Seetharaman <sekharan@xxxxxxxxxx>
Signed-Off-By: Gerrit Huizenga <gh@xxxxxxxxxx>
Removed without realizing it. Putting it back.
ckrm_numtasks.c | 3 +++
1 files changed, 3 insertions(+)
Index: linux-2.6.12-ckrm1/kernel/ckrm/ckrm_numtasks.c
===================================================================
--- linux-2.6.12-ckrm1.orig/kernel/ckrm/ckrm_numtasks.c 2005-06-20 13:08:40.000000000 -0700
+++ linux-2.6.12-ckrm1/kernel/ckrm/ckrm_numtasks.c 2005-06-20 13:08:41.000000000 -0700
@@ -165,6 +165,9 @@ static void numtasks_put_ref_local(struc
res = ckrm_get_res_class(core, resid, struct ckrm_numtasks);
if (res == NULL)
return;
+
+ if (atomic_read(&res->cnt_cur_alloc) == 0)
+ return;
atomic_dec(&res->cnt_cur_alloc);
if (atomic_read(&res->cnt_borrowed) > 0) {
atomic_dec(&res->cnt_borrowed);
--
-
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/