On Wed, Aug 09, 2023 at 08:45:32AM -0700, Darrick J. Wong wrote: > > blkdev_issue_flush(btp->bt_bdev); > > fs_put_dax(btp->bt_daxdev, btp->bt_mount); > > + /* the main block device is closed by kill_block_super */ > > + if (bdev != btp->bt_mount->m_super->s_bdev) > > + blkdev_put(bdev, btp->bt_mount->m_super); > > Hmm... I feel like this would be cleaner if the data dev buftarg could > get its own refcount separate from super_block.s_bdev, but I looked > through the code and couldn't identify a simple way to do that. Soo... blkdev_put doesn't really drop a refcount, it closes the device. It just happens to be misnamed, but Jan is looking into a series that will as a side effect end up with a better name for this functionality.