lkml.org 
[lkml]   [2015]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 06/10] mm: Add vmf_insert_pfn_pmd()
Date
Matthew Wilcox <matthew.r.wilcox@intel.com> writes:

> +static int insert_pfn_pmd(struct vm_area_struct *vma, unsigned long addr,
> + pmd_t *pmd, unsigned long pfn, pgprot_t prot, bool write)
> +{
> + struct mm_struct *mm = vma->vm_mm;
> + pmd_t entry;
> + spinlock_t *ptl;
> +
> + ptl = pmd_lock(mm, pmd);
> + if (pmd_none(*pmd)) {
> + entry = pmd_mkhuge(pfn_pmd(pfn, prot));
> + if (write) {
> + entry = pmd_mkyoung(pmd_mkdirty(entry));
> + entry = maybe_pmd_mkwrite(entry, vma);
> + }
> + set_pmd_at(mm, addr, pmd, entry);
> + update_mmu_cache_pmd(vma, addr, pmd);
> + }
> + spin_unlock(ptl);
> + return VM_FAULT_NOPAGE;
> +}

What's the point of the return value?

Cheers,
Jeff


\
 
 \ /
  Last update: 2015-07-13 15:41    [W:0.071 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site