From: Slava Pestov Date: Fri, 23 May 2014 18:18:35 +0000 (-0700) Subject: bcache: fix crash in bcache_btree_node_alloc_fail tracepoint X-Git-Tag: firefly_0821_release~176^2~3399^2^2~9 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=913dc33fb2720fb5f979011664294137ddd8b13b;p=firefly-linux-kernel-4.4.55.git bcache: fix crash in bcache_btree_node_alloc_fail tracepoint 'b' was NULL. Change-Id: Icac0fd04afa2d23f213d96d51afd53374e6dd0c0 --- diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index 39c7f5b73724..f8237856a61b 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c @@ -1096,7 +1096,7 @@ err_free: err: mutex_unlock(&c->bucket_lock); - trace_bcache_btree_node_alloc_fail(b); + trace_bcache_btree_node_alloc_fail(c); return b; } diff --git a/include/trace/events/bcache.h b/include/trace/events/bcache.h index 6778e4135a8e..981acf74b14f 100644 --- a/include/trace/events/bcache.h +++ b/include/trace/events/bcache.h @@ -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,