Commit 913dc33fb2720fb5f979011664294137ddd8b13b

Authored by Slava Pestov
Committed by Kent Overstreet
1 parent 60ae81eee8

bcache: fix crash in bcache_btree_node_alloc_fail tracepoint

'b' was NULL.

Change-Id: Icac0fd04afa2d23f213d96d51afd53374e6dd0c0

Showing 2 changed files with 4 additions and 4 deletions Side-by-side Diff

drivers/md/bcache/btree.c
... ... @@ -1096,7 +1096,7 @@
1096 1096 err:
1097 1097 mutex_unlock(&c->bucket_lock);
1098 1098  
1099   - trace_bcache_btree_node_alloc_fail(b);
  1099 + trace_bcache_btree_node_alloc_fail(c);
1100 1100 return b;
1101 1101 }
1102 1102  
include/trace/events/bcache.h
... ... @@ -261,9 +261,9 @@
261 261 TP_ARGS(b)
262 262 );
263 263  
264   -DEFINE_EVENT(btree_node, bcache_btree_node_alloc_fail,
265   - TP_PROTO(struct btree *b),
266   - TP_ARGS(b)
  264 +DEFINE_EVENT(cache_set, bcache_btree_node_alloc_fail,
  265 + TP_PROTO(struct cache_set *c),
  266 + TP_ARGS(c)
267 267 );
268 268  
269 269 DEFINE_EVENT(btree_node, bcache_btree_node_free,