From: NeilBrown Date: Fri, 24 Sep 2010 01:43:42 +0000 (+1000) Subject: Fix bug in sort_block X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=9cf269cbe3bc9973578088ce11b117c00d53b157;p=LaFS.git Fix bug in sort_block It doesn't handle 2 blocks the same - which isn't a big deal, but it is best to have the code 'right' Signed-off-by: NeilBrown --- diff --git a/modify.c b/modify.c index 424feba..4b74a65 100644 --- a/modify.c +++ b/modify.c @@ -80,8 +80,8 @@ static void sort_blocks(struct block **blkp) if (b[next] == NULL || (b[1-next] != NULL && !((prev <= b[1-next]->fileaddr) - ^(b[1-next]->fileaddr <= b[next]->fileaddr) - ^(b[next]->fileaddr <= prev))) + ^(prev <= b[next]->fileaddr) + ^(b[next]->fileaddr <= b[1-next]->fileaddr))) ) next = 1 - next;