ChangeSet 1.1492.1.4, 2005/04/05 11:10:24-03:00, [EMAIL PROTECTED]

        [PATCH] madvise_willneed -EIO beyond EOF
        
        When the rlim_rss was removed from madvise_willneed, we unintentionally
        changed its error when applied to an area wholly beyond end of file: it
        used to report -EIO (whereas 2.6 reports success), it currently reports
        the confusingly inappropriate -EBADF.  Revert to -EIO in that case.
        
        Signed-off-by: Hugh Dickins <[EMAIL PROTECTED]>



 filemap.c |    2 ++
 1 files changed, 2 insertions(+)


diff -Nru a/mm/filemap.c b/mm/filemap.c
--- a/mm/filemap.c      2005-04-05 13:03:10 -07:00
+++ b/mm/filemap.c      2005-04-05 13:03:10 -07:00
@@ -2605,6 +2605,8 @@
                end = vma->vm_end;
        end = ((end - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
 
+       error = -EIO;
+
        /* round to cluster boundaries if this isn't a "random" area. */
        if (!VM_RandomReadHint(vma)) {
                start = CLUSTER_OFFSET(start);
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to