From: Nathan Scott Date: Wed, 2 Nov 2005 04:14:09 +0000 (+1100) Subject: [XFS] Ensure fsync does not incorrectly return EIO for pages beyond EOF. X-Git-Tag: v2.6.15-rc1~450^2~2^2~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19d5bcf370c64b1acb1e928b24baf3b68cec914b;p=linux-2.6 [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 --- diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 1f38b528f0..c6108971b4 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/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; } }