summaryrefslogtreecommitdiffstats
path: root/fs/buffer.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-07-30 03:03:28 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-31 13:28:38 -0700
commit0e1dfc66b6ec94984a4778132147a8aa36461d58 (patch)
tree225a8e044e021a5a337704bc1f5ea862a5f75375 /fs/buffer.c
parenta268cefebceeb2046dfdfa301f041c2468536852 (diff)
downloadop-kernel-dev-0e1dfc66b6ec94984a4778132147a8aa36461d58.zip
op-kernel-dev-0e1dfc66b6ec94984a4778132147a8aa36461d58.tar.gz
[PATCH] invalidate_bdev() speedup
We can immediately bail from invalidate_bdev() if the blockdev has no pagecache. This solves the huge IPI storms which hald is causing on the big ia64 machines when it polls CDROM drives. Acked-by: Jes Sorensen <jes@sgi.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 3660dcb..71649ef 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -470,13 +470,18 @@ out:
pass does the actual I/O. */
void invalidate_bdev(struct block_device *bdev, int destroy_dirty_buffers)
{
+ struct address_space *mapping = bdev->bd_inode->i_mapping;
+
+ if (mapping->nrpages == 0)
+ return;
+
invalidate_bh_lrus();
/*
* FIXME: what about destroy_dirty_buffers?
* We really want to use invalidate_inode_pages2() for
* that, but not until that's cleaned up.
*/
- invalidate_inode_pages(bdev->bd_inode->i_mapping);
+ invalidate_inode_pages(mapping);
}
/*
OpenPOWER on IntegriCloud