summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2016-03-14 17:20:32 -0800
committerKent Overstreet <kent.overstreet@gmail.com>2016-08-28 19:15:20 -0800
commit0dd77eed2b36a0145bd8a6a4e73935e8b533cc28 (patch)
treeb780ec92b76f262cb1d7bf902627df6f9d3ee861
parent3939d5b7321dcd548d093126bbc568318bb9ee10 (diff)
bcache: use context_is_freezable()
-rw-r--r--fs/bcachefs/journal.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c
index 30e1eb13dc77..ae8c213c638f 100644
--- a/fs/bcachefs/journal.c
+++ b/fs/bcachefs/journal.c
@@ -2025,6 +2025,7 @@ int bch_journal_res_get(struct journal *j, struct journal_res *res,
{
int ret;
+ EBUG_ON(!context_is_freezable());
BUG_ON(res->ref);
BUG_ON(u64s_max < u64s_min);
@@ -2041,6 +2042,8 @@ int bch_journal_res_get(struct journal *j, struct journal_res *res,
void bch_journal_flush_seq_async(struct journal *j, u64 seq, struct closure *parent)
{
+ EBUG_ON(!context_is_freezable());
+
spin_lock(&j->lock);
BUG_ON(seq > j->seq);