diff options
-rw-r--r-- | fs/bcachefs/journal.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/journal.h b/fs/bcachefs/journal.h index f8867f86318a..81e26ba43fa1 100644 --- 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; |