[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>
This commit is contained in:
parent
a749ee8615
commit
19d5bcf370
@ -748,8 +748,9 @@ xfs_page_state_convert(
|
|||||||
if (page->index >= end_index) {
|
if (page->index >= end_index) {
|
||||||
if ((page->index >= end_index + 1) ||
|
if ((page->index >= end_index + 1) ||
|
||||||
!(i_size_read(inode) & (PAGE_CACHE_SIZE - 1))) {
|
!(i_size_read(inode) & (PAGE_CACHE_SIZE - 1))) {
|
||||||
err = -EIO;
|
if (startio)
|
||||||
goto error;
|
unlock_page(page);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user