Skip to content
Commit 0b50b731 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Fix refcounting in discard path



bch_dev->io_ref does not protect against the filesystem going away;
bch_fs->writes does.

Thus the filesystem write ref needs to be the last ref we release.

Reported-by: default avatar <syzbot+9e0404b505e604f67e41@syzkaller.appspotmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 8ed823b1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment