Skip to content
Commit fb5c2029 authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle)
Browse files

mm: Account dirty folios properly during splits



If the last folio in a file is split as a result of truncation,
we simply clear the dirty bits for the pages we're discarding.
That causes NR_FILE_DIRTY (among other counters) to be thrown off
and eventually Linux will hang in balance_dirty_pages_ratelimited()

Reported-by: default avatarDave Chinner <dchinner@redhat.com>
Tested-by: default avatarDave Chinner <dchinner@redhat.com>
Tested-by: default avatarDarrick J. Wong <djwong@kernel.org>
Fixes: d68eccad

 ("mm/filemap: Allow large folios to be added to the page cache")
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
parent 0840a791
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment