On Tue, Jul 02, 2024 at 05:42:16PM +0200, Christoph Hellwig wrote: > On Tue, Jul 02, 2024 at 02:01:23PM +0000, Pankaj Raghav (Samsung) wrote: > +static int iomap_dio_zero(const struct iomap_iter *iter, struct iomap_dio *dio, > > loff_t pos, unsigned len) > > { > > struct inode *inode = file_inode(dio->iocb->ki_filp); > > struct bio *bio; > > > > + if (!len) > > + return 0; > > /* > > * Max block size supported is 64k > > */ > > - WARN_ON_ONCE(len > ZERO_PAGE_64K_SIZE); > > + if (len > ZERO_PAGE_64K_SIZE) > > + return -EINVAL; > > The should probably be both WARN_ON_ONCE in addition to the error > return (and ZERO_PAGE_64K_SIZE really needs to go away..) Yes, I will rename it to ZERO_PAGE_SZ_64K as you suggested. > > > + ret = iomap_dio_zero(iter, dio, pos, fs_block_size - pad); > > Overly lone line here. > > Otherwise this looks good. >