From: Robert Jennings Date: Fri, 28 Jan 2011 15:01:55 +0000 (-0600) Subject: zram/xvmalloc: combine duplicate block delete code X-Git-Tag: v2.6.39-rc1~469^2~658 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=939b3f0b1415755d534a20f4067e6b367e1e4021;p=pandora-kernel.git zram/xvmalloc: combine duplicate block delete code This patch eliminates duplicate code. The remove_block_head function is a special case of remove_block which can be contained in remove_block without confusion. The portion of code in remove_block_head which was noted as "DEBUG ONLY" is now mandatory. Doing this provides consistent management of the double linked list of blocks under a freelist and makes this consolidation of delete block code safe. The first and last blocks will have NULL pointers in their previous and next page pointers respectively. Additionally, any time a block is removed from a free list the next and previous pointers will be set to NULL to avoid misuse outside xvmalloc. Signed-off-by: Robert Jennings Reviewed-by: Pekka Enberg Acked-by: Nitin Gupta Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed