From 6ed490f2510d4c727be79f0781e667e2c8d58364 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Mon, 20 Dec 2010 20:04:51 +0000 Subject: [PATCH] Remove dead code. According to the Linux Device Drivers, 3rd Edition book, alloc_pages() and free_pages() must be called with the same order, so that optimization cannot work (and that why it's currently disabled). From frank zago git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3157 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_mem.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/scst/src/scst_mem.c b/scst/src/scst_mem.c index f1d0f83e4..1f2f8aa63 100644 --- a/scst/src/scst_mem.c +++ b/scst/src/scst_mem.c @@ -546,17 +546,6 @@ static void sgv_free_sys_sg_entries(struct scatterlist *sg, int sg_count, while (pages > 0) { int order = 0; -/* - * __free_pages() doesn't like freeing pages with not that order with - * which they were allocated, so disable this small optimization. - */ -#if 0 - if (len > 0) { - while (((1 << order) << PAGE_SHIFT) < len) - order++; - len = 0; - } -#endif TRACE_MEM("free_pages(): order %d, page %lx", order, (unsigned long)p);