diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-06-28 18:11:46 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-06-28 18:26:04 -0400 |
commit | 34b5654d9eb1999704e75d964645e3aa9b78e249 (patch) | |
tree | 27269b040f9128cf33155a9ca47038703efc5606 /libbcachefs/seqmutex.h | |
parent | b0eb3c29304f9a4ca39c8534bb6476b170b2a7d0 (diff) |
Update bcachefs sources to 9404a01d3dc5 bcachefs: Make read_only a mount option again, but hiddenv1.9.2
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/seqmutex.h')
-rw-r--r-- | libbcachefs/seqmutex.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libbcachefs/seqmutex.h b/libbcachefs/seqmutex.h index c1860d81..c4b3d8d3 100644 --- a/libbcachefs/seqmutex.h +++ b/libbcachefs/seqmutex.h @@ -19,17 +19,14 @@ static inline bool seqmutex_trylock(struct seqmutex *lock) static inline void seqmutex_lock(struct seqmutex *lock) { mutex_lock(&lock->lock); -} - -static inline void seqmutex_unlock(struct seqmutex *lock) -{ lock->seq++; - mutex_unlock(&lock->lock); } -static inline u32 seqmutex_seq(struct seqmutex *lock) +static inline u32 seqmutex_unlock(struct seqmutex *lock) { - return lock->seq; + u32 seq = lock->seq; + mutex_unlock(&lock->lock); + return seq; } static inline bool seqmutex_relock(struct seqmutex *lock, u32 seq) |