X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=mm%2Fmmap.c;h=7a0707a480479f1837cc6537182300bd6d94d51f;hb=2382705f22c1436a153800cf6051b08f0ea14838;hp=69cad562cd002331b104746de9a5e88d3742ef84;hpb=3ef0a61a467639cf7def299309cd9ea524c3e1c1;p=cascardo%2Flinux.git diff --git a/mm/mmap.c b/mm/mmap.c index 69cad562cd00..7a0707a48047 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -3068,6 +3068,14 @@ out: return ERR_PTR(ret); } +bool vma_is_special_mapping(const struct vm_area_struct *vma, + const struct vm_special_mapping *sm) +{ + return vma->vm_private_data == sm && + (vma->vm_ops == &special_mapping_vmops || + vma->vm_ops == &legacy_special_mapping_vmops); +} + /* * Called with mm->mmap_sem held for writing. * Insert a new vma covering the given region, with the given flags.