-
Andrew Morton authored
A forward port. At present, msync() does not report errors from EIO or ENOSPC. fsync() has the same bug for mapped pages against the affected fd. The patch correctly propagates these errors back up from writepage so that fsync and msync correctly report errors. It's fairly important - msync is the only way we have of reporting ENOSPC against sparse mappings. Of course, you can still silently lose your data if it's kswapd who gets ENOSPC during writepage. I have 3/4 of a patch for that. It records the data loss so that a later msync() will report the bad news. This patch also adds an implementation of msync(MS_ASYNC), because it was easy.
1c000719