fs: page cache wrongly left invalidated after revalidate_disk

From: MITSUNARI Shigeo
Date: Mon Oct 22 2012 - 18:32:37 EST


We found that bdev->bd_invalidated was left set once revalidate_disk()
is called, which results in page cache flush every time that device
is open.

Specifically, we found this problem in MD block device. Once we
resize a MD device, mdadm --monitor periodically flush all page cache
for that device every 60 or 1000 seconds when it opens the device.

This bug lies since at least 3.2.0 till the latest kernel(3.6.2).
Patch is attached.

Anyone please review this? Thanks in advance.