On Sat, Sep 13, 2025 at 11:37:15AM +0800, alexjlzheng@xxxxxxxxx wrote: > From: Jinliang Zheng <alexjlzheng@xxxxxxxxxxx> > > iomap_folio_state marks the uptodate state in units of block_size, so > it is better to check that pos and length are aligned with block_size. > > Signed-off-by: Jinliang Zheng <alexjlzheng@xxxxxxxxxxx> > --- > fs/iomap/buffered-io.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c > index fd827398afd2..0c38333933c6 100644 > --- a/fs/iomap/buffered-io.c > +++ b/fs/iomap/buffered-io.c > @@ -234,6 +234,9 @@ static void iomap_adjust_read_range(struct inode *inode, struct folio *folio, > unsigned first = poff >> block_bits; > unsigned last = (poff + plen - 1) >> block_bits; > > + WARN_ON(*pos & (block_size - 1)); > + WARN_ON(length & (block_size - 1)); Any reason you chose WARN_ON instead of WARN_ON_ONCE? I don't see WARN_ON being used in iomap/buffered-io.c. -- Pankaj