]> git.hungrycats.org Git - linux/commitdiff
JFS: remove racy, redundant call to block_invalidatepage
authorDave Kleikamp <shaggy@shaggy.austin.ibm.com>
Wed, 29 Oct 2003 10:05:37 +0000 (04:05 -0600)
committerDave Kleikamp <shaggy@shaggy.austin.ibm.com>
Wed, 29 Oct 2003 10:05:37 +0000 (04:05 -0600)
__invalidate_metapages references mp->page after after releasing the
meta_lock spinlock, without increasing the use count.  This is racy and
unnecessary since setting the META_discard flag is sufficient.
block_invalidatepage() will be called when the metapage is released.

fs/jfs/jfs_metapage.c

index a8100967e196321e636ec06bdd190b1f716b18ca..84742dc9c57d2c1499da973db5f99b64fadacca3 100644 (file)
@@ -511,9 +511,6 @@ void __invalidate_metapages(struct inode *ip, s64 addr, int len)
                if (mp) {
                        set_bit(META_discard, &mp->flag);
                        spin_unlock(&meta_lock);
-                       lock_page(mp->page);
-                       block_invalidatepage(mp->page, 0);
-                       unlock_page(mp->page);
                } else {
                        spin_unlock(&meta_lock);
                        page = find_lock_page(mapping, lblock>>l2BlocksPerPage);