]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
UBI: Fix problem in UBI/Linux "compatibility layer"
authorStefan Roese <sr@denx.de>
Mon, 17 May 2010 08:01:05 +0000 (10:01 +0200)
committerStefan Roese <sr@denx.de>
Wed, 19 May 2010 08:57:24 +0000 (10:57 +0200)
"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 <sr@denx.de>
include/ubi_uboot.h

index 60f6a5fb4f53ed7464f1c5d3d53d088d501ef494..d2c90a6b44715b64f6fbf5df84e99ba1bc633018 100644 (file)
@@ -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)