I realized yesterday that the fix missed one rare case
still. if the hiwmk_check() returned with error and no_fail override was set
then the counter would still cross 0 on free.
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@677
d57e44dd-8a1f-0410-8b47-
8ef2f437770f
if (!no_fail) {
res = NULL;
goto out;
- }
+ } else {
+ /*
+ * Update active_pages_total since alloc can't fail.
+ * If it wasn't updated then the counter would cross 0
+ * on free again.
+ */
+ sgv_pool_hiwmk_uncheck(-pages);
+ }
}
res = kmalloc(pages*sizeof(*res), gfp_mask);
sizeof(obj->trans_tbl[0]) : 0));
} else {
size = sizeof(*obj);
-
/* both sgv and ttbl are kallocated() */
}