Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 913dc33f authored by Slava Pestov's avatar Slava Pestov Committed by Kent Overstreet
Browse files

bcache: fix crash in bcache_btree_node_alloc_fail tracepoint

'b' was NULL.

Change-Id: Icac0fd04afa2d23f213d96d51afd53374e6dd0c0
parent 60ae81ee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1096,7 +1096,7 @@ struct btree *__bch_btree_node_alloc(struct cache_set *c, struct btree_op *op,
err:
	mutex_unlock(&c->bucket_lock);

	trace_bcache_btree_node_alloc_fail(b);
	trace_bcache_btree_node_alloc_fail(c);
	return b;
}

+3 −3
Original line number Diff line number Diff line
@@ -261,9 +261,9 @@ DEFINE_EVENT(btree_node, bcache_btree_node_alloc,
	TP_ARGS(b)
);

DEFINE_EVENT(btree_node, bcache_btree_node_alloc_fail,
	TP_PROTO(struct btree *b),
	TP_ARGS(b)
DEFINE_EVENT(cache_set, bcache_btree_node_alloc_fail,
	TP_PROTO(struct cache_set *c),
	TP_ARGS(c)
);

DEFINE_EVENT(btree_node, bcache_btree_node_free,