@@ -476,7 +476,7 @@ static inline vm_fault_t do_exception(struct pt_regs *regs, int access)
476
476
* make sure we exit gracefully rather than endlessly redo
477
477
* the fault.
478
478
*/
479
- fault = handle_mm_fault (vma , address , flags , NULL );
479
+ fault = handle_mm_fault (vma , address , flags , regs );
480
480
if (fault_signal_pending (fault , regs )) {
481
481
fault = VM_FAULT_SIGNAL ;
482
482
if (flags & FAULT_FLAG_RETRY_NOWAIT )
@@ -486,21 +486,7 @@ static inline vm_fault_t do_exception(struct pt_regs *regs, int access)
486
486
if (unlikely (fault & VM_FAULT_ERROR ))
487
487
goto out_up ;
488
488
489
- /*
490
- * Major/minor page fault accounting is only done on the
491
- * initial attempt. If we go through a retry, it is extremely
492
- * likely that the page will be found in page cache at that point.
493
- */
494
489
if (flags & FAULT_FLAG_ALLOW_RETRY ) {
495
- if (fault & VM_FAULT_MAJOR ) {
496
- tsk -> maj_flt ++ ;
497
- perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ , 1 ,
498
- regs , address );
499
- } else {
500
- tsk -> min_flt ++ ;
501
- perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN , 1 ,
502
- regs , address );
503
- }
504
490
if (fault & VM_FAULT_RETRY ) {
505
491
if (IS_ENABLED (CONFIG_PGSTE ) && gmap &&
506
492
(flags & FAULT_FLAG_RETRY_NOWAIT )) {
0 commit comments