/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1277:9: warning: expecting mutex 'this_parent->d_lockref...lock' to be held at start of each loop [-Wthread-safety-analysis]
next = this_parent->d_subdirs.next;
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1263:2: note: mutex acquired here
spin_lock(&this_parent->d_lock);
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1294:4: 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:1300:4: 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:1311: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:1322:3: warning: releasing mutex 'child->d_lockref...lock' that was not held [-Wthread-safety-analysis]
spin_unlock(&child->d_lock);
^
/home/himanshu/clang-thread-safety-analysis/fs/dcache.c:1323:3: warning: acquiring mutex 'this_parent->d_lockref...lock' that is already held [-Wthread-safety-analysis]
spin_lock(&this_parent->d_lock);
^
Similar to: https://github.com/ClangBuiltLinux/thread-safety-analysis/issues/28#issuecomment-496215839