On Tue, Jul 11, 2023 at 08:19:50AM +0200, Hannes Reinecke wrote: >> for (i = 0; i < sbi->s_ndevs; i++) { >> - blkdev_put(FDEV(i).bdev, sbi->sb->s_type); >> + if (i > 0) >> + blkdev_put(FDEV(i).bdev, sbi->sb->s_type); > You could have started the loop at '1', and avoid the curious 'if' clause That's what the previous version did, which caused a NULL pointer dereference discussed in this thread, as well as a compile error for non-zoned builds..