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 <fzago@systemfabricworks.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3157 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2010-12-20 20:04:51 +00:00
parent 25dd5b2e2e
commit 6ed490f251

View File

@@ -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);