aboutsummaryrefslogtreecommitdiff
path: root/mm/madvise.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/madvise.c')
-rw-r--r--mm/madvise.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/madvise.c b/mm/madvise.c
index fa6479aca0c9..16441f550cdf 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -393,7 +393,7 @@ static int madvise_free_single_vma(struct vm_area_struct *vma,
return -EINVAL;
/* MADV_FREE works for only anon vma at the moment */
- if (vma->vm_file)
+ if (!vma_is_anonymous(vma))
return -EINVAL;
start = max(vma->vm_start, start_addr);