[PATCH] Allow truncate to discard unmapped buffers
authorAndrew Morton <akpm@zip.com.au>
Sun, 5 May 2002 08:09:33 +0000 (01:09 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sun, 5 May 2002 08:09:33 +0000 (01:09 -0700)
commit6c8dd3365680e292d2cfbb435e02dae667fb31df
treec68f7b92f7c7f81032503a8b35f09bff613bcbdf
parent22eca178b9835532d829231ff6dd526deacc92bd
[PATCH] Allow truncate to discard unmapped buffers

The buffer state "uptodate, dirty, unmapped" is legal.  It occurs when
a mapped page with attached buffers which is over a hole is dirtied.

So discard_buffer() needs to be able to discard those buffers as well;
otherwise the page ends up clean, with dirty buffers and is unfreeable.
fs/buffer.c
fs/jbd/transaction.c