# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/04/05 11:10:24-03:00 hugh@veritas.com # [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 # # mm/filemap.c # 2005/03/30 17:01:19-03:00 hugh@veritas.com +2 -0 # madvise_willneed -EIO beyond EOF # diff -Nru a/mm/filemap.c b/mm/filemap.c --- a/mm/filemap.c 2005-04-05 13:03:30 -07:00 +++ b/mm/filemap.c 2005-04-05 13:03:30 -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);