Skip to contentSkip to conversation

UBI: Fix problem in UBI/Linux "compatibility layer"

PATCH New Stefan Roese 1 participant 2 messages May 17, 2010 – May 19, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 include/ubi_uboot.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/ubi_uboot.h +1 -1
index 60f6a5f..d2c90a6 100644
@@ -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)
 
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 UBI: Fix problem in UBI/Linux "compatibility layer"

Quoted 3 lines · On Monday 17 May 2010 10:01:05 Stefan Roese wrote:

"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.

Applied to u-boot-ubi/master. Thanks.

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de