diff options
-rw-r--r-- | Documentation/feature-removal-schedule.txt | 9 | ||||
-rw-r--r-- | Documentation/filesystems/Locking | 3 | ||||
-rw-r--r-- | drivers/media/video/vino.c | 2 | ||||
-rw-r--r-- | drivers/video/vermilion/vermilion.c | 5 | ||||
-rw-r--r-- | fs/gfs2/ops_address.c | 2 | ||||
-rw-r--r-- | include/linux/mm.h | 8 | ||||
-rw-r--r-- | mm/memory.c | 22 | ||||
-rw-r--r-- | mm/mincore.c | 2 | ||||
-rw-r--r-- | mm/rmap.c | 1 |
9 files changed, 11 insertions, 43 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 448729fcaeb..599fe55bf29 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -128,15 +128,6 @@ Who: Arjan van de Ven <arjan@linux.intel.com> | |||
128 | 128 | ||
129 | --------------------------- | 129 | --------------------------- |
130 | 130 | ||
131 | What: vm_ops.nopage | ||
132 | When: Soon, provided in-kernel callers have been converted | ||
133 | Why: This interface is replaced by vm_ops.fault, but it has been around | ||
134 | forever, is used by a lot of drivers, and doesn't cost much to | ||
135 | maintain. | ||
136 | Who: Nick Piggin <npiggin@suse.de> | ||
137 | |||
138 | --------------------------- | ||
139 | |||
140 | What: PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment | 131 | What: PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment |
141 | When: October 2008 | 132 | When: October 2008 |
142 | Why: The stacking of class devices makes these values misleading and | 133 | Why: The stacking of class devices makes these values misleading and |
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 42d4b30b104..c2992bc54f2 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -511,7 +511,6 @@ prototypes: | |||
511 | void (*open)(struct vm_area_struct*); | 511 | void (*open)(struct vm_area_struct*); |
512 | void (*close)(struct vm_area_struct*); | 512 | void (*close)(struct vm_area_struct*); |
513 | int (*fault)(struct vm_area_struct*, struct vm_fault *); | 513 | int (*fault)(struct vm_area_struct*, struct vm_fault *); |
514 | struct page *(*nopage)(struct vm_area_struct*, unsigned long, int *); | ||
515 | int (*page_mkwrite)(struct vm_area_struct *, struct page *); | 514 | int (*page_mkwrite)(struct vm_area_struct *, struct page *); |
516 | 515 | ||
517 | locking rules: | 516 | locking rules: |
@@ -519,7 +518,6 @@ locking rules: | |||
519 | open: no yes | 518 | open: no yes |
520 | close: no yes | 519 | close: no yes |
521 | fault: no yes | 520 | fault: no yes |
522 | nopage: no yes | ||
523 | page_mkwrite: no yes no | 521 | page_mkwrite: no yes no |
524 | 522 | ||
525 | ->page_mkwrite() is called when a previously read-only page is | 523 | ->page_mkwrite() is called when a previously read-only page is |
@@ -537,4 +535,3 @@ NULL. | |||
537 | 535 | ||
538 | ipc/shm.c::shm_delete() - may need BKL. | 536 | ipc/shm.c::shm_delete() - may need BKL. |
539 | ->read() and ->write() in many drivers are (probably) missing BKL. | 537 | ->read() and ->write() in many drivers are (probably) missing BKL. |
540 | drivers/sgi/char/graphics.c::sgi_graphics_nopage() - may need BKL. | ||
diff --git a/drivers/media/video/vino.c b/drivers/media/video/vino.c index d545c98dd5e..01ea99c9bc1 100644 --- a/drivers/media/video/vino.c +++ b/drivers/media/video/vino.c | |||
@@ -13,7 +13,7 @@ | |||
13 | /* | 13 | /* |
14 | * TODO: | 14 | * TODO: |
15 | * - remove "mark pages reserved-hacks" from memory allocation code | 15 | * - remove "mark pages reserved-hacks" from memory allocation code |
16 | * and implement nopage() | 16 | * and implement fault() |
17 | * - check decimation, calculating and reporting image size when | 17 | * - check decimation, calculating and reporting image size when |
18 | * using decimation | 18 | * using decimation |
19 | * - implement read(), user mode buffers and overlay (?) | 19 | * - implement read(), user mode buffers and overlay (?) |
diff --git a/drivers/video/vermilion/vermilion.c b/drivers/video/vermilion/vermilion.c index 2aa71eb67c2..c18f1884b55 100644 --- a/drivers/video/vermilion/vermilion.c +++ b/drivers/video/vermilion/vermilion.c | |||
@@ -112,8 +112,9 @@ static int vmlfb_alloc_vram_area(struct vram_area *va, unsigned max_order, | |||
112 | 112 | ||
113 | /* | 113 | /* |
114 | * It seems like __get_free_pages only ups the usage count | 114 | * It seems like __get_free_pages only ups the usage count |
115 | * of the first page. This doesn't work with nopage mapping, so | 115 | * of the first page. This doesn't work with fault mapping, so |
116 | * up the usage count once more. | 116 | * up the usage count once more (XXX: should use split_page or |
117 | * compound page). | ||
117 | */ | 118 | */ |
118 | 119 | ||
119 | memset((void *)va->logical, 0x00, va->size); | 120 | memset((void *)va->logical, 0x00, va->size); |
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c index 90a04a6e378..f55394e57cb 100644 --- a/fs/gfs2/ops_address.c +++ b/fs/gfs2/ops_address.c | |||
@@ -438,7 +438,7 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page) | |||
438 | int error; | 438 | int error; |
439 | 439 | ||
440 | /* | 440 | /* |
441 | * Due to the order of unstuffing files and ->nopage(), we can be | 441 | * Due to the order of unstuffing files and ->fault(), we can be |
442 | * asked for a zero page in the case of a stuffed file being extended, | 442 | * asked for a zero page in the case of a stuffed file being extended, |
443 | * so we need to supply one here. It doesn't happen often. | 443 | * so we need to supply one here. It doesn't happen often. |
444 | */ | 444 | */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 286d3152160..ca973359fe5 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -164,8 +164,6 @@ struct vm_operations_struct { | |||
164 | void (*open)(struct vm_area_struct * area); | 164 | void (*open)(struct vm_area_struct * area); |
165 | void (*close)(struct vm_area_struct * area); | 165 | void (*close)(struct vm_area_struct * area); |
166 | int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf); | 166 | int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf); |
167 | struct page *(*nopage)(struct vm_area_struct *area, | ||
168 | unsigned long address, int *type); | ||
169 | unsigned long (*nopfn)(struct vm_area_struct *area, | 167 | unsigned long (*nopfn)(struct vm_area_struct *area, |
170 | unsigned long address); | 168 | unsigned long address); |
171 | 169 | ||
@@ -649,12 +647,6 @@ static inline int page_mapped(struct page *page) | |||
649 | } | 647 | } |
650 | 648 | ||
651 | /* | 649 | /* |
652 | * Error return values for the *_nopage functions | ||
653 | */ | ||
654 | #define NOPAGE_SIGBUS (NULL) | ||
655 | #define NOPAGE_OOM ((struct page *) (-1)) | ||
656 | |||
657 | /* | ||
658 | * Error return values for the *_nopfn functions | 650 | * Error return values for the *_nopfn functions |
659 | */ | 651 | */ |
660 | #define NOPFN_SIGBUS ((unsigned long) -1) | 652 | #define NOPFN_SIGBUS ((unsigned long) -1) |
diff --git a/mm/memory.c b/mm/memory.c index 0d14d1e58a5..46958fb97c2 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -1057,8 +1057,7 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
1057 | if (pages) | 1057 | if (pages) |
1058 | foll_flags |= FOLL_GET; | 1058 | foll_flags |= FOLL_GET; |
1059 | if (!write && !(vma->vm_flags & VM_LOCKED) && | 1059 | if (!write && !(vma->vm_flags & VM_LOCKED) && |
1060 | (!vma->vm_ops || (!vma->vm_ops->nopage && | 1060 | (!vma->vm_ops || !vma->vm_ops->fault)) |
1061 | !vma->vm_ops->fault))) | ||
1062 | foll_flags |= FOLL_ANON; | 1061 | foll_flags |= FOLL_ANON; |
1063 | 1062 | ||
1064 | do { | 1063 | do { |
@@ -2199,20 +2198,9 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
2199 | 2198 | ||
2200 | BUG_ON(vma->vm_flags & VM_PFNMAP); | 2199 | BUG_ON(vma->vm_flags & VM_PFNMAP); |
2201 | 2200 | ||
2202 | if (likely(vma->vm_ops->fault)) { | 2201 | ret = vma->vm_ops->fault(vma, &vmf); |
2203 | ret = vma->vm_ops->fault(vma, &vmf); | 2202 | if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE))) |
2204 | if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE))) | 2203 | return ret; |
2205 | return ret; | ||
2206 | } else { | ||
2207 | /* Legacy ->nopage path */ | ||
2208 | ret = 0; | ||
2209 | vmf.page = vma->vm_ops->nopage(vma, address & PAGE_MASK, &ret); | ||
2210 | /* no page was available -- either SIGBUS or OOM */ | ||
2211 | if (unlikely(vmf.page == NOPAGE_SIGBUS)) | ||
2212 | return VM_FAULT_SIGBUS; | ||
2213 | else if (unlikely(vmf.page == NOPAGE_OOM)) | ||
2214 | return VM_FAULT_OOM; | ||
2215 | } | ||
2216 | 2204 | ||
2217 | /* | 2205 | /* |
2218 | * For consistency in subsequent calls, make the faulted page always | 2206 | * For consistency in subsequent calls, make the faulted page always |
@@ -2458,7 +2446,7 @@ static inline int handle_pte_fault(struct mm_struct *mm, | |||
2458 | if (!pte_present(entry)) { | 2446 | if (!pte_present(entry)) { |
2459 | if (pte_none(entry)) { | 2447 | if (pte_none(entry)) { |
2460 | if (vma->vm_ops) { | 2448 | if (vma->vm_ops) { |
2461 | if (vma->vm_ops->fault || vma->vm_ops->nopage) | 2449 | if (likely(vma->vm_ops->fault)) |
2462 | return do_linear_fault(mm, vma, address, | 2450 | return do_linear_fault(mm, vma, address, |
2463 | pte, pmd, write_access, entry); | 2451 | pte, pmd, write_access, entry); |
2464 | if (unlikely(vma->vm_ops->nopfn)) | 2452 | if (unlikely(vma->vm_ops->nopfn)) |
diff --git a/mm/mincore.c b/mm/mincore.c index 5efe0ded69b..5178800bc12 100644 --- a/mm/mincore.c +++ b/mm/mincore.c | |||
@@ -33,7 +33,7 @@ static unsigned char mincore_page(struct address_space *mapping, pgoff_t pgoff) | |||
33 | * When tmpfs swaps out a page from a file, any process mapping that | 33 | * When tmpfs swaps out a page from a file, any process mapping that |
34 | * file will not get a swp_entry_t in its pte, but rather it is like | 34 | * file will not get a swp_entry_t in its pte, but rather it is like |
35 | * any other file mapping (ie. marked !present and faulted in with | 35 | * any other file mapping (ie. marked !present and faulted in with |
36 | * tmpfs's .nopage). So swapped out tmpfs mappings are tested here. | 36 | * tmpfs's .fault). So swapped out tmpfs mappings are tested here. |
37 | * | 37 | * |
38 | * However when tmpfs moves the page from pagecache and into swapcache, | 38 | * However when tmpfs moves the page from pagecache and into swapcache, |
39 | * it is still in core, but the find_get_page below won't find it. | 39 | * it is still in core, but the find_get_page below won't find it. |
@@ -662,7 +662,6 @@ void page_remove_rmap(struct page *page, struct vm_area_struct *vma) | |||
662 | printk (KERN_EMERG " page->mapping = %p\n", page->mapping); | 662 | printk (KERN_EMERG " page->mapping = %p\n", page->mapping); |
663 | print_symbol (KERN_EMERG " vma->vm_ops = %s\n", (unsigned long)vma->vm_ops); | 663 | print_symbol (KERN_EMERG " vma->vm_ops = %s\n", (unsigned long)vma->vm_ops); |
664 | if (vma->vm_ops) { | 664 | if (vma->vm_ops) { |
665 | print_symbol (KERN_EMERG " vma->vm_ops->nopage = %s\n", (unsigned long)vma->vm_ops->nopage); | ||
666 | print_symbol (KERN_EMERG " vma->vm_ops->fault = %s\n", (unsigned long)vma->vm_ops->fault); | 665 | print_symbol (KERN_EMERG " vma->vm_ops->fault = %s\n", (unsigned long)vma->vm_ops->fault); |
667 | } | 666 | } |
668 | if (vma->vm_file && vma->vm_file->f_op) | 667 | if (vma->vm_file && vma->vm_file->f_op) |