diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2011-05-04 12:53:25 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2011-05-04 12:53:25 +1000 |
commit | b7e57bf2561ee6493ccf5ea944b73b925fd88c3f (patch) | |
tree | 21d97a57285294c0c6a204e2a13a386badd15afa /fs/buffer.c | |
parent | 24edd08bdaf937aeb0fe6d181b4f187d2d9dcbf4 (diff) | |
parent | e046b9640996aa07d240865d97527ed3ea26289d (diff) |
Merge remote-tracking branch 'cleancache/linux-next'
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index a08bb8e61c6f..de05703b184b 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -41,6 +41,7 @@ #include <linux/bitops.h> #include <linux/mpage.h> #include <linux/bit_spinlock.h> +#include <linux/cleancache.h> static int fsync_buffers_list(spinlock_t *lock, struct list_head *list); @@ -269,6 +270,10 @@ void invalidate_bdev(struct block_device *bdev) invalidate_bh_lrus(); lru_add_drain_all(); /* make sure all lru add caches are flushed */ invalidate_mapping_pages(mapping, 0, -1); + /* 99% of the time, we don't need to flush the cleancache on the bdev. + * But, for the strange corners, lets be cautious + */ + cleancache_flush_inode(mapping); } EXPORT_SYMBOL(invalidate_bdev); |