diff mbox series

[U-Boot] ubifs: Change value of mutex_is_locked()

Message ID 1522860136-23548-1-git-send-email-bradleybolen@gmail.com
State Accepted
Commit 05ea83b67ed7861c1693187dbf3a2613601c1b15
Delegated to: Heiko Schocher
Headers show
Series [U-Boot] ubifs: Change value of mutex_is_locked() | expand

Commit Message

Bradley Bolen April 4, 2018, 4:42 p.m. UTC
The mutex lock and unlock functions are stubbed out and mutex_is_locked
was 0.  This caused asserts to fail in ubifs code when checking that the
mutex was locked.  For example,

UBIFS assert failed in ubifs_change_lp at 540
UBIFS assert failed in ubifs_release_lprops at 278

Assume that the "mutex" is locked since that is the normal case when it
is checked in the ubifs code.

Signed-off-by: Bradley Bolen <bradleybolen@gmail.com>
---
 fs/ubifs/ubifs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Heiko Schocher April 11, 2018, 12:46 p.m. UTC | #1
Hello Bradley,

Am 04.04.2018 um 18:42 schrieb Bradley Bolen:
> The mutex lock and unlock functions are stubbed out and mutex_is_locked
> was 0.  This caused asserts to fail in ubifs code when checking that the
> mutex was locked.  For example,
> 
> UBIFS assert failed in ubifs_change_lp at 540
> UBIFS assert failed in ubifs_release_lprops at 278
> 
> Assume that the "mutex" is locked since that is the normal case when it
> is checked in the ubifs code.
> 
> Signed-off-by: Bradley Bolen <bradleybolen@gmail.com>
> ---
>   fs/ubifs/ubifs.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-ubi master

Thanks!

bye,
Heiko
diff mbox series

Patch

diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index 1d89465..70b794a 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -611,7 +611,7 @@  static inline ino_t parent_ino(struct dentry *dentry)
 /* misc.h */
 #define mutex_lock_nested(...)
 #define mutex_unlock_nested(...)
-#define mutex_is_locked(...)	0
+#define mutex_is_locked(...)	1
 #endif
 
 /* Version of this UBIFS implementation */