From f6471886663eb4da0707e5fb0621a90793f47fd7 Mon Sep 17 00:00:00 2001 From: "S.J.R. van Schaik" Date: Mon, 29 May 2017 17:42:21 +0200 Subject: [PATCH] ftl: fix bug where constant is not bitshifted --- source/ftl/map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ftl/map.c b/source/ftl/map.c index b7e25ef..61e16e6 100644 --- a/source/ftl/map.c +++ b/source/ftl/map.c @@ -132,7 +132,7 @@ int write_upage(struct ftl_map *map, const void *page, return -1; if (page && flash_write(map->dev, map->head << map->log2_page_size, page, - map->log2_page_size) == 0) + 1 << map->log2_page_size) == 0) return -1; return write_page_desc(map, page_desc);