]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/xfs/linux-2.6/xfs_aops.c
[XFS] Ensure fsync does not incorrectly return EIO for pages beyond EOF.
[mirror_ubuntu-bionic-kernel.git] / fs / xfs / linux-2.6 / xfs_aops.c
index 1f38b528f0bd43855109abc16223c31f7fa82a59..c6108971b4e6a4febd84be420c6da7b832acf768 100644 (file)
@@ -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;
                }
        }