ClangBuiltLinux / thread-safety-analysis

A research project into applying Clang's Thread Safety Analysis to the Linux Kernel
Other
6 stars 0 forks source link

fs/fat/inode.c: fat_{lock,unlock}_build_inode: conditional lock and unlock functions #154

Open bulwahn opened 5 years ago

bulwahn commented 5 years ago
fs/fat/inode.c:576:1: warning: mutex 'sbi->nfs_build_inode_lock' is not held on every path through here [-Wthread-safety-analysis]
}
^
fs/fat/inode.c:575:3: note: mutex acquired here
                mutex_lock(&sbi->nfs_build_inode_lock);
                ^
fs/fat/inode.c:581:3: warning: releasing mutex 'sbi->nfs_build_inode_lock' that was not held [-Wthread-safety-analysis]
                mutex_unlock(&sbi->nfs_build_inode_lock);
                ^

The functions lock and unlock sbi->nfs_build_inode_lock when sbi->options.nfs == FAT_NFS_NOSTALE_RO.