소스 검색

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 <sr@denx.de>
Stefan Roese 15 년 전
부모
커밋
bdc5f06789
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      include/ubi_uboot.h

+ 1 - 1
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)