loop: prevent bdev freeing while device in use