lkml.org 
[lkml]   [2011]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 7/7] zram/xvmalloc: combine duplicate block delete code
From
Date
On Fri, 2011-01-28 at 09:01 -0600, Robert Jennings wrote:
> 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 <rcj@linux.vnet.ibm.com>

Looks OK to me but we should really get Nitin's ACK for this.

Reviewed-by: Pekka Enberg <penberg@kernel.org>



\
 
 \ /
  Last update: 2011-01-29 09:53    [W:0.076 / U:4.108 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site