diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-01-25 10:18:32 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:49 -0400 |
commit | 3e57db65cdd93bee55d1ecf53ff4ab895e05c40e (patch) | |
tree | be0b3de051d553e8b7f68b2b4d273ad13e09799e /fs/bcachefs/util.c | |
parent | 01ad673727b59664c9d12df4e5b6f5bad1ea2825 (diff) | |
download | linux-stable-3e57db65cdd93bee55d1ecf53ff4ab895e05c40e.tar.gz linux-stable-3e57db65cdd93bee55d1ecf53ff4ab895e05c40e.tar.bz2 linux-stable-3e57db65cdd93bee55d1ecf53ff4ab895e05c40e.zip |
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: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/util.c')
-rw-r--r-- | fs/bcachefs/util.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/bcachefs/util.c b/fs/bcachefs/util.c index 31934f7a6436..e6672b67ae32 100644 --- a/fs/bcachefs/util.c +++ b/fs/bcachefs/util.c @@ -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++) { |