[PATCH] remove racy, redundant call to block_flushpage (1 of 1)

Dave Kleikamp <[email protected]> Wed, 29 Oct 2003 12:09:06 -0600
Newsgroups gmane.comp.file-systems.jfs.patches
Message-ID <[email protected]>
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1160  -> 1.1160.2.1
#	fs/jfs/jfs_metapage.c	1.10    -> 1.11   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/10/29	[email protected]	1.1160.2.1
# JFS: remove racy, redundant call to block_flushpage
# 
# __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_flushpage() will be called when the metapage is released.
# --------------------------------------------
#
diff -Nru a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c
--- a/fs/jfs/jfs_metapage.c	Wed Oct 29 12:06:08 2003
+++ b/fs/jfs/jfs_metapage.c	Wed Oct 29 12:06:08 2003
@@ -558,9 +558,6 @@
 		if (mp) {
 			set_bit(META_discard, &mp->flag);
 			spin_unlock(&meta_lock);
-			lock_page(mp->page);
-			block_flushpage(mp->page, 0);
-			UnlockPage(mp->page);
 		} else {
 			spin_unlock(&meta_lock);
 			page = find_lock_page(mapping, lblock>>l2BlocksPerPage);