Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

btrfs: do not directly include rwlock_types.h

There is already an error inside that header:

#if !defined(__LINUX_SPINLOCK_TYPES_H)
# error "Do not include directly, include spinlock_types.h"
#endif

Thankfully it never get triggered as some other headers have already
included spinlock_types.h.

However clangd would still do a proper warning on that if only
extent_map.h is opened.
Fix it by using spinlock_types.h instead.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>

authored by

Qu Wenruo and committed by
David Sterba
c27b1dbb 3b8dbf34

+1 -1
+1 -1
fs/btrfs/extent_map.h
··· 4 4 #define BTRFS_EXTENT_MAP_H 5 5 6 6 #include <linux/compiler_types.h> 7 - #include <linux/rwlock_types.h> 7 + #include <linux/spinlock_types.h> 8 8 #include <linux/rbtree.h> 9 9 #include <linux/list.h> 10 10 #include <linux/refcount.h>