From: Peter Zijlstra Date: Sun, 6 May 2007 21:49:55 +0000 (-0700) Subject: mm: optimize acorn partition truncate X-Git-Tag: v2.6.22-rc1~945 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=96018fdacbfcaf6a0694d066b525f67c24025688;p=linux-2.6-omap-h63xx.git mm: optimize acorn partition truncate invalidate_bdev() is superfluous when truncate_inode_pages() is also called. do call invalidate_bh_lrus() though, to avoid stale pointers. Signed-off-by: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/partitions/acorn.c b/fs/partitions/acorn.c index 9a6826c6381..e3491328596 100644 --- a/fs/partitions/acorn.c +++ b/fs/partitions/acorn.c @@ -271,7 +271,7 @@ adfspart_check_ADFS(struct parsed_partitions *state, struct block_device *bdev) extern void xd_set_geometry(struct block_device *, unsigned char, unsigned char, unsigned int); xd_set_geometry(bdev, dr->secspertrack, heads, 1); - invalidate_bdev(bdev); + invalidate_bh_lrus(); truncate_inode_pages(bdev->bd_inode->i_mapping, 0); } #endif