Commit 3e57db65 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Use trylock in bch2_prt_backtrace()

Easy workaround for a lockdep splat - and since bch2_prt_backtrace() is
only used in debug code this is fine.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 01ad6737
......@@ -270,11 +270,9 @@ int bch2_prt_backtrace(struct printbuf *out, struct task_struct *task)
{
unsigned long entries[32];
unsigned i, nr_entries;
int ret;
ret = down_read_killable(&task->signal->exec_update_lock);
if (ret)
return ret;
if (!down_read_trylock(&task->signal->exec_update_lock))
return 0;
nr_entries = stack_trace_save_tsk(task, entries, ARRAY_SIZE(entries), 0);
for (i = 0; i < nr_entries; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment