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:<syzbot+9e0404b505e604f67e41@syzkaller.appspotmail.com> Signed-off-by:
Kent Overstreet <kent.overstreet@linux.dev>
Loading
Please register or sign in to comment