On Mon, Aug 05, 2019 at 02:31:24PM +0200, Andreas Gruenbacher wrote: > > + WARN_ON_ONCE(i_blocksize(inode) < PAGE_SIZE && !iop); > > + WARN_ON_ONCE(iop && atomic_read(&iop->write_count) != 0); > > How about this instead? > > if (iop) > WARN_ON_ONCE(atomic_read(&iop->write_count) != 0); > else > WARN_ON_ONCE(i_blocksize(inode) < PAGE_SIZE); For one I don't really want to change the code from before in a move patch, but second I also wrote it like that as having conditionals just around asserts seems a little odd. This also helps with the next step of the evolution where we'll allocate the iops on demand and skip it for small block size file systems as long as a page is only covered by a single extent, as we then can remove the first assert.