From 834dc29d521d34718602bfb8d93d370093a5d430 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Tue, 24 Jan 2023 19:42:04 -0500 Subject: [PATCH] bcachefs: debug: Fix some locking bugs This fixes a few error paths in debug code that lead to locks failing to be dropped. Signed-off-by: Kent Overstreet --- fs/bcachefs/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/bcachefs/debug.c b/fs/bcachefs/debug.c index ab210296223b1..fcefd55a53224 100644 --- a/fs/bcachefs/debug.c +++ b/fs/bcachefs/debug.c @@ -520,7 +520,7 @@ static ssize_t bch2_btree_transactions_read(struct file *file, char __user *buf, ret = flush_buf(i); if (ret) - return ret; + break; bch2_btree_trans_to_text(&i->buf, trans); @@ -711,7 +711,7 @@ static ssize_t bch2_btree_deadlock_read(struct file *file, char __user *buf, ret = flush_buf(i); if (ret) - return ret; + break; bch2_check_for_deadlock(trans, &i->buf); -- 2.30.2