projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94035ee
)
bcachefs: Improve lockdep annotation in journalling code
author
Kent Overstreet
<kent.overstreet@gmail.com>
Sat, 11 Apr 2020 16:30:30 +0000
(12:30 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:38 +0000
(17:08 -0400)
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>
fs/bcachefs/journal.h
patch
|
blob
|
history
diff --git
a/fs/bcachefs/journal.h
b/fs/bcachefs/journal.h
index f8867f86318af1f7cfd7a15c2e42f4bd83ba3689..81e26ba43fa122cfdbb1b463c1c1201c4405b1aa 100644
(file)
--- a/
fs/bcachefs/journal.h
+++ b/
fs/bcachefs/journal.h
@@
-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;