mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 03:01:26 +00:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user