On Mon, Nov 27, 2023 at 09:17:07AM +0530, Ritesh Harjani wrote: > Christoph Hellwig <hch@xxxxxx> writes: > > > write_cache_pages always clear the page dirty bit before calling into the > > file systems, and leaves folios with a writeback failure without the > > dirty bit after return. We also clear the per-block writeback bits for > > you mean per-block dirty bits, right? Yes, sorry. > /* > * Let the filesystem know what portion of the current page > * failed to map. If the page hasn't been added to ioend, it > * won't be affected by I/O completion and we must unlock it > * now. > */ > The comment to unlock it now becomes stale here. Indeed. > Maybe why not move iomap_clear_range_dirty() before? A few patches down the ->discard_folio call moves into a helper, so I'd rather avoid the churn here. I'll move that part of the comment to thew new check below iomap_clear_range_dirty instead.