Sorry, but this is simply broken. We can't just do d_path magic here. That being said the problem is real, and I think the right answer is to offer a swapoff variant that doesn't need to open the underlying device or file, but useѕ some kind of handle. I'm just not sure what would be a good handle here.