Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72944
b: refs/heads/master
c: 5307cc1
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Oct 31, 2007
1 parent d830a0e commit 563230b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bb374b7b938f73666c403b201b3dd48ec9fe118a
refs/heads/master: 5307cc1aa53850f017c8053db034cf950b670ac9
13 changes: 2 additions & 11 deletions trunk/mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ int filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)

size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
if (vmf->pgoff >= size)
goto outside_data_content;
return VM_FAULT_SIGBUS;

/* If we don't want any read-ahead, don't bother */
if (VM_RandomReadHint(vma))
Expand Down Expand Up @@ -1377,7 +1377,7 @@ int filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
if (unlikely(vmf->pgoff >= size)) {
unlock_page(page);
page_cache_release(page);
goto outside_data_content;
return VM_FAULT_SIGBUS;
}

/*
Expand All @@ -1388,15 +1388,6 @@ int filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
vmf->page = page;
return ret | VM_FAULT_LOCKED;

outside_data_content:
/*
* An external ptracer can access pages that normally aren't
* accessible..
*/
if (vma->vm_mm == current->mm)
return VM_FAULT_SIGBUS;

/* Fall through to the non-read-ahead case */
no_cached_page:
/*
* We're only likely to ever get here if MADV_RANDOM is in
Expand Down

0 comments on commit 563230b

Please sign in to comment.