Skip to content

Commit 2368fcf

Browse files
committed
Merge tag 'header_cleanup-2024-01-20' of https://evilpiepirate.org/git/bcachefs
Pull header fix from Kent Overstreet: "Just one small fixup for the RT build" * tag 'header_cleanup-2024-01-20' of https://evilpiepirate.org/git/bcachefs: spinlock: Fix failing build for PREEMPT_RT
2 parents 7a39682 + 5f4c01f commit 2368fcf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

include/linux/spinlock.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,12 @@ static __always_inline int spin_is_contended(spinlock_t *lock)
449449
return raw_spin_is_contended(&lock->rlock);
450450
}
451451

452+
#define assert_spin_locked(lock) assert_raw_spin_locked(&(lock)->rlock)
453+
454+
#else /* !CONFIG_PREEMPT_RT */
455+
# include <linux/spinlock_rt.h>
456+
#endif /* CONFIG_PREEMPT_RT */
457+
452458
/*
453459
* Does a critical section need to be broken due to another
454460
* task waiting?: (technically does not depend on CONFIG_PREEMPTION,
@@ -480,12 +486,6 @@ static inline int rwlock_needbreak(rwlock_t *lock)
480486
#endif
481487
}
482488

483-
#define assert_spin_locked(lock) assert_raw_spin_locked(&(lock)->rlock)
484-
485-
#else /* !CONFIG_PREEMPT_RT */
486-
# include <linux/spinlock_rt.h>
487-
#endif /* CONFIG_PREEMPT_RT */
488-
489489
/*
490490
* Pull the atomic_t declaration:
491491
* (asm-mips/atomic.h needs above definitions)

0 commit comments

Comments
 (0)