Message ID | 1c461e2717312cb530377a519316a8c64cd13c09.1716874214.git.wqu@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: basic header cleanups | expand |
On Tue, May 28, 2024 at 6:34 AM Qu Wenruo <wqu@suse.com> wrote: > > 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. > > Signed-off-by: Qu Wenruo <wqu@suse.com> Looks good, but the subject is missing a word, it should be: btrfs: do not directly include rwlock_types.h Anyway, that can be updated when adding the patch to for-next, so: Reviewed-by: Filipe Manana <fdmanana@suse.com> Thanks. > --- > fs/btrfs/extent_map.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/btrfs/extent_map.h b/fs/btrfs/extent_map.h > index d3d1e5b7528d..5154a8f1d26c 100644 > --- a/fs/btrfs/extent_map.h > +++ b/fs/btrfs/extent_map.h > @@ -4,7 +4,7 @@ > #define BTRFS_EXTENT_MAP_H > > #include <linux/compiler_types.h> > -#include <linux/rwlock_types.h> > +#include <linux/spinlock_types.h> > #include <linux/rbtree.h> > #include <linux/list.h> > #include <linux/refcount.h> > -- > 2.45.1 > >
diff --git a/fs/btrfs/extent_map.h b/fs/btrfs/extent_map.h index d3d1e5b7528d..5154a8f1d26c 100644 --- a/fs/btrfs/extent_map.h +++ b/fs/btrfs/extent_map.h @@ -4,7 +4,7 @@ #define BTRFS_EXTENT_MAP_H #include <linux/compiler_types.h> -#include <linux/rwlock_types.h> +#include <linux/spinlock_types.h> #include <linux/rbtree.h> #include <linux/list.h> #include <linux/refcount.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. Signed-off-by: Qu Wenruo <wqu@suse.com> --- fs/btrfs/extent_map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)