[PATCH 2/2] block: Move shared code in get_chunk() out of if statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 common/block.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/common/block.c b/common/block.c
index 3a031a4fc..291721876 100644
--- a/common/block.c
+++ b/common/block.c
@@ -133,13 +133,12 @@ static struct chunk *get_chunk(struct block_device *blk)
 
 			chunk->dirty = 0;
 		}
-
-		list_del(&chunk->list);
 	} else {
 		chunk = list_first_entry(&blk->idle_blocks, struct chunk, list);
-		list_del(&chunk->list);
 	}
 
+	list_del(&chunk->list);
+
 	return chunk;
 }
 
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux