mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] bcachefs: WARNING in bch2_trans_srcu_unlock
@ 2024-07-24  1:08 Camila Alvarez
  2024-08-02 16:30 ` Kent Overstreet
  0 siblings, 1 reply; 3+ messages in thread
From: Camila Alvarez @ 2024-07-24  1:08 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Brian Foster, linux-bcachefs, linux-kernel,
	syzbot+1e515cab343dbe5aa38a, Camila Alvarez

bch2_extent_fallocate should not return -BCH_ERR_transaction_restart_nested when there are no buckets available.
Returning -BCH_ERR_transaction_restart_nested causes the sector allocation to retry even if there's no space available.

Reported-by: syzbot+1e515cab343dbe5aa38a@syzkaller.appspotmail.com
Signed-off-by: Camila Alvarez <cam.alvarez.i@gmail.com>
---
 fs/bcachefs/io_misc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/bcachefs/io_misc.c b/fs/bcachefs/io_misc.c
index 82f9170dab3f..b5b92ef030df 100644
--- a/fs/bcachefs/io_misc.c
+++ b/fs/bcachefs/io_misc.c
@@ -90,8 +90,6 @@ int bch2_extent_fallocate(struct btree_trans *trans,
 				opts.data_replicas,
 				opts.data_replicas,
 				BCH_WATERMARK_normal, 0, &cl, &wp);
-		if (bch2_err_matches(ret, BCH_ERR_operation_blocked))
-			ret = -BCH_ERR_transaction_restart_nested;
 		if (ret)
 			goto err;
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-07  3:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-24  1:08 [PATCH] bcachefs: WARNING in bch2_trans_srcu_unlock Camila Alvarez
2024-08-02 16:30 ` Kent Overstreet
2024-08-07  3:04   ` Camila Alvarez Inostroza

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®