mm: optimize acorn partition truncate
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Sun, 6 May 2007 21:49:55 +0000 (14:49 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 7 May 2007 19:12:55 +0000 (12:12 -0700)
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 <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/partitions/acorn.c

index 9a6826c63818a2d6b32f150e7c4f6bb669e66e7d..e3491328596bccaf75d89e7208fda194cddf289a 100644 (file)
@@ -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