diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-05-17 01:38:57 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-05-17 02:36:19 -0400 |
commit | ff86d4722124c300c40b85b6eb8ef2d410ab303c (patch) | |
tree | 05e54b0bf6397ecbb5e7717a7925ac6ed2645a68 /libbcachefs/six.c | |
parent | 800408be11898f6d53ceecfd894cce8860fda26a (diff) |
Update bcachefs sources to 0906b1fb49 bcachefs: fixes for 32 bit/big endian machines
Diffstat (limited to 'libbcachefs/six.c')
-rw-r--r-- | libbcachefs/six.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libbcachefs/six.c b/libbcachefs/six.c index f0ff8d41..afa59a47 100644 --- a/libbcachefs/six.c +++ b/libbcachefs/six.c @@ -146,6 +146,8 @@ struct six_lock_waiter { /* This is probably up there with the more evil things I've done */ #define waitlist_bitnr(id) ilog2((((union six_lock_state) { .waiters = 1 << (id) }).l)) +#ifdef CONFIG_LOCK_SPIN_ON_OWNER + static inline int six_can_spin_on_owner(struct six_lock *lock) { struct task_struct *owner; @@ -257,6 +259,15 @@ fail: return false; } +#else /* CONFIG_LOCK_SPIN_ON_OWNER */ + +static inline bool six_optimistic_spin(struct six_lock *lock, enum six_lock_type type) +{ + return false; +} + +#endif + noinline static void __six_lock_type_slowpath(struct six_lock *lock, enum six_lock_type type) { |