Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\dax.c Create Date:2022-07-28 20:23:14
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Walk all mappings of a given index of a file and writeprotect them

Proto:static void dax_entry_mkclean(struct address_space *mapping, unsigned long index, unsigned long pfn)

Type:void

Parameter:

TypeParameterName
struct address_space *mapping
unsigned longindex
unsigned longpfn
780  pte_t pte, * ptep = NULL
781  pmd_t * pmdp = NULL
784  i_mmap_lock_read(mapping)
789  cond_resched()
791  If Not (Flags, see mm.h. & VM_SHARED) Then Continue
794  address = pgoff_address(index, vma)
801  If follow_pte_pmd(The address space we belong to. , address, & range, & ptep, & pmdp, & ptl) Then Continue
812  If pmdp Then
828  spin_unlock(ptl)
829  Else
830  If pfn != pte_pfn( * ptep) Then Go to unlock_pte
832  If Not The following only work if pte_present() is true.* Undefined behaviour if not.. && Not pte_write( * ptep) Then Go to unlock_pte
835  flush_cache_page(vma, address, pfn)
836  pte = ptep_clear_flush(vma, address, ptep)
837  pte = pte_wrprotect(pte)
838  pte = pte_mkclean(pte)
839  set_pte_at(The address space we belong to. , address, ptep, pte)
840  unlock_pte :
841  pte_unmap_unlock(ptep, ptl)
844  mmu_notifier_invalidate_range_end( & range)
846  i_mmap_unlock_read(mapping)
Caller
NameDescribe
dax_writeback_one