Browse Source

[XFS] Don't map non-uptodate buffers in xfs_probe_cluster; also fixes
obscure corruption case

SGI-PV: 942658
SGI-Modid: xfs-linux-melb:xfs-kern:207119a

Signed-off-by: Eric Sandeen <sandeen@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>

Eric Sandeen 19 years ago
parent
commit
2353e8e9b6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      fs/xfs/linux-2.6/xfs_aops.c

+ 1 - 1
fs/xfs/linux-2.6/xfs_aops.c

@@ -540,7 +540,7 @@ xfs_probe_cluster(
 
 
 	/* First sum forwards in this page */
 	/* First sum forwards in this page */
 	do {
 	do {
-		if (mapped != buffer_mapped(bh))
+		if (!buffer_uptodate(bh) || (mapped != buffer_mapped(bh)))
 			return total;
 			return total;
 		total += bh->b_size;
 		total += bh->b_size;
 	} while ((bh = bh->b_this_page) != head);
 	} while ((bh = bh->b_this_page) != head);