diff --git a/mm/hugetlb.c b/mm/hugetlb.c index c715bb91605860..5f5c545cdf06f5 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2929,7 +2929,8 @@ int hugetlb_reserve_pages(struct inode *inode, region_add(&inode->i_mapping->private_list, from, to); return 0; out_err: - resv_map_put(vma); + if (vma) + resv_map_put(vma); return ret; }