patch-2.4.20 linux-2.4.20/drivers/scsi/sym53c8xx_2/sym_malloc.c

Next file: linux-2.4.20/drivers/scsi/sym53c8xx_comm.h
Previous file: linux-2.4.20/drivers/scsi/sym53c8xx_2/sym_glue.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/drivers/scsi/sym53c8xx_2/sym_malloc.c linux-2.4.20/drivers/scsi/sym53c8xx_2/sym_malloc.c
@@ -143,12 +143,15 @@
 	a = (m_addr_t) ptr;
 
 	while (1) {
-#ifdef SYM_MEM_FREE_UNUSED
 		if (s == SYM_MEM_CLUSTER_SIZE) {
+#ifdef SYM_MEM_FREE_UNUSED
 			M_FREE_MEM_CLUSTER(a);
+#else
+			((m_link_p) a)->next = h[i].next;
+			h[i].next = (m_link_p) a;
+#endif
 			break;
 		}
-#endif
 		b = a ^ s;
 		q = &h[i];
 		while (q->next && q->next != (m_link_p) b) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)