Skip to content

Commit

Permalink
Merge tag 'header_cleanup-2024-01-20' of https://evilpiepirate.org/gi…
Browse files Browse the repository at this point in the history
…t/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
  • Loading branch information
Linus Torvalds committed Jan 21, 2024
2 parents 7a39682 + 5f4c01f commit 2368fcf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/linux/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,12 @@ static __always_inline int spin_is_contended(spinlock_t *lock)
return raw_spin_is_contended(&lock->rlock);
}

#define assert_spin_locked(lock) assert_raw_spin_locked(&(lock)->rlock)

#else /* !CONFIG_PREEMPT_RT */
# include <linux/spinlock_rt.h>
#endif /* CONFIG_PREEMPT_RT */

/*
* Does a critical section need to be broken due to another
* task waiting?: (technically does not depend on CONFIG_PREEMPTION,
Expand Down Expand Up @@ -480,12 +486,6 @@ static inline int rwlock_needbreak(rwlock_t *lock)
#endif
}

#define assert_spin_locked(lock) assert_raw_spin_locked(&(lock)->rlock)

#else /* !CONFIG_PREEMPT_RT */
# include <linux/spinlock_rt.h>
#endif /* CONFIG_PREEMPT_RT */

/*
* Pull the atomic_t declaration:
* (asm-mips/atomic.h needs above definitions)
Expand Down

0 comments on commit 2368fcf

Please sign in to comment.