On Wed, May 16, 2018 at 09:23:29AM -0700, Christoph Hellwig wrote: > > > > - /* Skip holes. */ > > + /* No holes. */ > > if (iomap->type == IOMAP_HOLE) > > - goto out; > > + goto err; > > If we end up not allowing holes this check can just be removed > entirely. We already check for the allow types below. I have to > admit I would move that type check above the bdev check, though. True, although I wonder if we should be logging more specific error messages instead of a generic "not a valid swap file" message. At least for my Btrfs patches, that's what I do. I'll send a v2 with a second patch doing that.