Skip to content

Commit 1267df4

Browse files
author
Kent Overstreet
committed
bcachefs: Initialize bch_write_op->failed in inline data path
Normally this is initialized in __bch2_write(), which is executed in a loop, but the inline data path skips this. Reported-by: syzbot+fd3ccb331eb21f05d13b@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
1 parent feb077c commit 1267df4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

fs/bcachefs/io_write.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,6 +1513,8 @@ static void bch2_write_data_inline(struct bch_write_op *op, unsigned data_len)
15131513
unsigned sectors;
15141514
int ret;
15151515

1516+
memset(&op->failed, 0, sizeof(op->failed));
1517+
15161518
op->flags |= BCH_WRITE_WROTE_DATA_INLINE;
15171519
op->flags |= BCH_WRITE_DONE;
15181520

0 commit comments

Comments
 (0)