/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1040:3: warning: releasing mutex 'dentry->d_lockref...lock' that was not held [-Wthread-safety-analysis]
spin_unlock(&dentry->d_lock);
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1050:11: warning: mutex 'inode->i_lock' is not held on every path through here [-Wthread-safety-analysis]
parent = dentry->d_parent;
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1041:3: note: mutex acquired here
spin_lock(&inode->i_lock);
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1050:11: warning: mutex 'dentry->d_lockref...lock' is not held on every path through here [-Wthread-safety-analysis]
parent = dentry->d_parent;
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1042:3: note: mutex acquired here
spin_lock(&dentry->d_lock);
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1054:2: warning: releasing mutex 'dentry->d_lockref...lock' that was not held [-Wthread-safety-analysis]
spin_unlock(&dentry->d_lock);
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1066:6: warning: mutex 'dentry->d_lockref...lock' is not held on every path through here [-Wthread-safety-analysis]
if (inode)
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1058:3: note: mutex acquired here
spin_lock(&dentry->d_lock);
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1066:6: warning: mutex 'inode->i_lock' is not held on every path through here [-Wthread-safety-analysis]
if (inode)
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1041:3: note: mutex acquired here
spin_lock(&inode->i_lock);
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1066:6: warning: mutex 'dentry->d_lockref...lock' is not held on every path through here [-Wthread-safety-analysis]
if (inode)
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1042:3: note: mutex acquired here
spin_lock(&dentry->d_lock);
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1066:6: warning: mutex 'inode->i_lock' is not held on every path through here [-Wthread-safety-analysis]
if (inode)
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1041:3: note: mutex acquired here
spin_lock(&inode->i_lock);
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1066:6: warning: mutex 'dentry->d_lockref...lock' is not held on every path through here [-Wthread-safety-analysis]
if (inode)
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1042:3: note: mutex acquired here
spin_lock(&dentry->d_lock);
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1067:3: warning: releasing mutex 'inode->i_lock' that was not held [-Wthread-safety-analysis]
spin_unlock(&inode->i_lock);
^
Similar to: https://github.com/ClangBuiltLinux/thread-safety-analysis/issues/28#issuecomment-496215839 Complex locking and unlocking using nested conditionals.