Message ID | 20241217070542.2483-2-wsa+renesas@sang-engineering.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | btrfs: don't include '<linux/rwlock_types.h>' directly | expand |
在 2024/12/17 17:35, Wolfram Sang 写道: > The header clearly states that it does not want to be included directly, > only via '<linux/spinlock_types.h>'. Replace the include accordingly. > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > --- > fs/btrfs/fs.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/btrfs/fs.h b/fs/btrfs/fs.h > index 79a1a3d6f04d..78e558652908 100644 > --- a/fs/btrfs/fs.h > +++ b/fs/btrfs/fs.h > @@ -14,7 +14,7 @@ > #include <linux/lockdep.h> > #include <linux/spinlock.h> > #include <linux/mutex.h> > -#include <linux/rwlock_types.h> > +#include <linux/spinlock_types.h> I think we can just remove the *_type.h include header completely. For non-RT build, spinlock.h will include linux/rwlock.h, and spinlock_types.h unconditionally. Thanks, Qu > #include <linux/rwsem.h> > #include <linux/semaphore.h> > #include <linux/list.h>
Hi, > > -#include <linux/rwlock_types.h> > > +#include <linux/spinlock_types.h> > > I think we can just remove the *_type.h include header completely. I agree, spinlock.h is enough. > For non-RT build, spinlock.h will include linux/rwlock.h, and > spinlock_types.h unconditionally. Yet, isn't it always included unconditionally? spinlock.h -> spinlock_types.h -> rwlock_types.h I don't see any conditionals there. Thanks for the review and happy hacking, Wolfram
diff --git a/fs/btrfs/fs.h b/fs/btrfs/fs.h index 79a1a3d6f04d..78e558652908 100644 --- a/fs/btrfs/fs.h +++ b/fs/btrfs/fs.h @@ -14,7 +14,7 @@ #include <linux/lockdep.h> #include <linux/spinlock.h> #include <linux/mutex.h> -#include <linux/rwlock_types.h> +#include <linux/spinlock_types.h> #include <linux/rwsem.h> #include <linux/semaphore.h> #include <linux/list.h>
The header clearly states that it does not want to be included directly, only via '<linux/spinlock_types.h>'. Replace the include accordingly. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> --- fs/btrfs/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)