From: Stefan Roese Date: Mon, 17 May 2010 08:01:05 +0000 (+0200) Subject: UBI: Fix problem in UBI/Linux "compatibility layer" X-Git-Tag: v2010.06-rc1~10^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bdc5f06789c5a0c3a9a2c0eb33ec4d177dbdaa22;p=u-boot UBI: Fix problem in UBI/Linux "compatibility layer" "down_write_trylock" needs to return 1 instead of 0 for success. Otherwise copying a block with a read error (e.g. bit-flip on read) won't work correctly. Signed-off-by: Stefan Roese --- diff --git a/include/ubi_uboot.h b/include/ubi_uboot.h index 60f6a5fb4f..d2c90a6b44 100644 --- a/include/ubi_uboot.h +++ b/include/ubi_uboot.h @@ -123,7 +123,7 @@ typedef int wait_queue_head_t; #define init_rwsem(...) do { } while (0) #define down_read(...) do { } while (0) #define down_write(...) do { } while (0) -#define down_write_trylock(...) 0 +#define down_write_trylock(...) 1 #define up_read(...) do { } while (0) #define up_write(...) do { } while (0)