提交 0e8fb931 编写于 作者: J Jan Kara 提交者: Linus Torvalds

mm: remove VM_FAULT_MINOR

The define has a comment from Nick Piggin from 2007:

 /* For backwards compat. Remove me quickly. */

I guess 9 years should not be too hurried sense of 'quickly' even for
kernel measures.
Signed-off-by: NJan Kara <jack@suse.cz>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 870d4b12
...@@ -346,7 +346,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) ...@@ -346,7 +346,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
up_read(&mm->mmap_sem); up_read(&mm->mmap_sem);
/* /*
* Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR * Handle the "normal" case first - VM_FAULT_MAJOR
*/ */
if (likely(!(fault & (VM_FAULT_ERROR | VM_FAULT_BADMAP | VM_FAULT_BADACCESS)))) if (likely(!(fault & (VM_FAULT_ERROR | VM_FAULT_BADMAP | VM_FAULT_BADACCESS))))
return 0; return 0;
......
...@@ -295,7 +295,7 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr, ...@@ -295,7 +295,7 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
up_read(&mm->mmap_sem); up_read(&mm->mmap_sem);
/* /*
* Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR * Handle the "normal" case first - VM_FAULT_MAJOR
*/ */
if (likely(!(fault & (VM_FAULT_ERROR | VM_FAULT_BADMAP | if (likely(!(fault & (VM_FAULT_ERROR | VM_FAULT_BADMAP |
VM_FAULT_BADACCESS)))) VM_FAULT_BADACCESS))))
......
...@@ -276,7 +276,7 @@ static int do_pf(unsigned long addr, unsigned int fsr, struct pt_regs *regs) ...@@ -276,7 +276,7 @@ static int do_pf(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
up_read(&mm->mmap_sem); up_read(&mm->mmap_sem);
/* /*
* Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR * Handle the "normal" case first - VM_FAULT_MAJOR
*/ */
if (likely(!(fault & if (likely(!(fault &
(VM_FAULT_ERROR | VM_FAULT_BADMAP | VM_FAULT_BADACCESS)))) (VM_FAULT_ERROR | VM_FAULT_BADMAP | VM_FAULT_BADACCESS))))
......
...@@ -146,7 +146,7 @@ void do_page_fault(struct pt_regs *regs) ...@@ -146,7 +146,7 @@ void do_page_fault(struct pt_regs *regs)
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
if (flags & VM_FAULT_MAJOR) if (flags & VM_FAULT_MAJOR)
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address); perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address);
else if (flags & VM_FAULT_MINOR) else
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address); perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
return; return;
......
...@@ -1052,8 +1052,6 @@ static inline void clear_page_pfmemalloc(struct page *page) ...@@ -1052,8 +1052,6 @@ static inline void clear_page_pfmemalloc(struct page *page)
* just gets major/minor fault counters bumped up. * just gets major/minor fault counters bumped up.
*/ */
#define VM_FAULT_MINOR 0 /* For backwards compat. Remove me quickly. */
#define VM_FAULT_OOM 0x0001 #define VM_FAULT_OOM 0x0001
#define VM_FAULT_SIGBUS 0x0002 #define VM_FAULT_SIGBUS 0x0002
#define VM_FAULT_MAJOR 0x0004 #define VM_FAULT_MAJOR 0x0004
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册