__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.
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);