mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
bcachefs: Improve lockdep annotation in journalling code
bch2_journal_res_get() in nonblocking mode is equivalent to a trylock. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
94035eed52
commit
15a07f2eae
@ -346,7 +346,9 @@ static inline int bch2_journal_res_get(struct journal *j, struct journal_res *re
|
||||
return ret;
|
||||
out:
|
||||
if (!(flags & JOURNAL_RES_GET_CHECK)) {
|
||||
lock_acquire_shared(&j->res_map, 0, 0, NULL, _THIS_IP_);
|
||||
lock_acquire_shared(&j->res_map, 0,
|
||||
(flags & JOURNAL_RES_GET_NONBLOCK) != 0,
|
||||
NULL, _THIS_IP_);
|
||||
EBUG_ON(!res->ref);
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user