76
76
#include <linux/ptrace.h>
77
77
#include <linux/vmalloc.h>
78
78
#include <linux/sched/sysctl.h>
79
- #include <linux/fsnotify.h>
80
79
81
80
#include <trace/events/kmem.h>
82
81
@@ -5750,17 +5749,8 @@ static vm_fault_t do_numa_page(struct vm_fault *vmf)
5750
5749
static inline vm_fault_t create_huge_pmd (struct vm_fault * vmf )
5751
5750
{
5752
5751
struct vm_area_struct * vma = vmf -> vma ;
5753
-
5754
5752
if (vma_is_anonymous (vma ))
5755
5753
return do_huge_pmd_anonymous_page (vmf );
5756
- /*
5757
- * Currently we just emit PAGE_SIZE for our fault events, so don't allow
5758
- * a huge fault if we have a pre content watch on this file. This would
5759
- * be trivial to support, but there would need to be tests to ensure
5760
- * this works properly and those don't exist currently.
5761
- */
5762
- if (unlikely (FMODE_FSNOTIFY_HSM (vma -> vm_file -> f_mode )))
5763
- return VM_FAULT_FALLBACK ;
5764
5754
if (vma -> vm_ops -> huge_fault )
5765
5755
return vma -> vm_ops -> huge_fault (vmf , PMD_ORDER );
5766
5756
return VM_FAULT_FALLBACK ;
@@ -5784,9 +5774,6 @@ static inline vm_fault_t wp_huge_pmd(struct vm_fault *vmf)
5784
5774
}
5785
5775
5786
5776
if (vma -> vm_flags & (VM_SHARED | VM_MAYSHARE )) {
5787
- /* See comment in create_huge_pmd. */
5788
- if (unlikely (FMODE_FSNOTIFY_HSM (vma -> vm_file -> f_mode )))
5789
- goto split ;
5790
5777
if (vma -> vm_ops -> huge_fault ) {
5791
5778
ret = vma -> vm_ops -> huge_fault (vmf , PMD_ORDER );
5792
5779
if (!(ret & VM_FAULT_FALLBACK ))
@@ -5809,9 +5796,6 @@ static vm_fault_t create_huge_pud(struct vm_fault *vmf)
5809
5796
/* No support for anonymous transparent PUD pages yet */
5810
5797
if (vma_is_anonymous (vma ))
5811
5798
return VM_FAULT_FALLBACK ;
5812
- /* See comment in create_huge_pmd. */
5813
- if (unlikely (FMODE_FSNOTIFY_HSM (vma -> vm_file -> f_mode )))
5814
- return VM_FAULT_FALLBACK ;
5815
5799
if (vma -> vm_ops -> huge_fault )
5816
5800
return vma -> vm_ops -> huge_fault (vmf , PUD_ORDER );
5817
5801
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
@@ -5829,9 +5813,6 @@ static vm_fault_t wp_huge_pud(struct vm_fault *vmf, pud_t orig_pud)
5829
5813
if (vma_is_anonymous (vma ))
5830
5814
goto split ;
5831
5815
if (vma -> vm_flags & (VM_SHARED | VM_MAYSHARE )) {
5832
- /* See comment in create_huge_pmd. */
5833
- if (unlikely (FMODE_FSNOTIFY_HSM (vma -> vm_file -> f_mode )))
5834
- goto split ;
5835
5816
if (vma -> vm_ops -> huge_fault ) {
5836
5817
ret = vma -> vm_ops -> huge_fault (vmf , PUD_ORDER );
5837
5818
if (!(ret & VM_FAULT_FALLBACK ))
0 commit comments