Browse Source

[XFS] Ensure fsync does not incorrectly return EIO for pages beyond EOF.

SGI-PV: 944819
SGI-Modid: xfs-linux:xfs-kern:24236a

Signed-off-by: Nathan Scott <nathans@sgi.com>
Nathan Scott 19 năm trước cách đây
mục cha
commit
19d5bcf370
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      fs/xfs/linux-2.6/xfs_aops.c

+ 3 - 2
fs/xfs/linux-2.6/xfs_aops.c

@@ -748,8 +748,9 @@ xfs_page_state_convert(
 	if (page->index >= end_index) {
 		if ((page->index >= end_index + 1) ||
 		    !(i_size_read(inode) & (PAGE_CACHE_SIZE - 1))) {
-			err = -EIO;
-			goto error;
+			if (startio)
+				unlock_page(page);
+			return 0;
 		}
 	}