From: Stefan Roese Date: Mon, 17 May 2010 10:01:05 +0200 Subject: [U-Boot] [PATCH] UBI: Fix problem in UBI/Linux "compatibility layer" Message-ID: <1274083265-3771-1-git-send-email-sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de "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 --- include/ubi_uboot.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/ubi_uboot.h b/include/ubi_uboot.h index 60f6a5f..d2c90a6 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) -- 1.7.1