diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2011-04-19 14:03:38 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2011-04-19 14:03:38 +1000 |
commit | 6532a332e5b3090b2e4d8199b7bc7aebcdbf7d79 (patch) | |
tree | 2b680602ad99e9f6f20e4eaaa89ce933a78161ff /fs/buffer.c | |
parent | 139ef72b3e5e566bf957ae1a672b44e9ea5b2c1a (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); |