]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: fix seqmutex_relock()
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 23 Jun 2024 00:52:39 +0000 (20:52 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 23 Jun 2024 04:57:21 +0000 (00:57 -0400)
commitf44cc269a1c148ad83332d85fe54607e8874ca79
tree13c72b423b7756eaa1f588c2165653faaee8dc22
parent9bd01500e4d8c3c3387076581c19b3987776d7af
bcachefs: fix seqmutex_relock()

We were grabbing the sequence number before unlock incremented it - fix
this by moving the increment to seqmutex_lock() (so the seqmutex_relock()
failure path skips the mutex_trylock()), and returning the sequence
number from unlock(), to make the API simpler and safer.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/debug.c
fs/bcachefs/seqmutex.h