summaryrefslogtreecommitdiffstats
path: root/fs/hugetlbfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hugetlbfs/inode.c')
-rw-r--r--fs/hugetlbfs/inode.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index f23237135163..1dcc57189382 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -497,8 +497,15 @@ static void hugetlbfs_evict_inode(struct inode *inode)
497 struct resv_map *resv_map; 497 struct resv_map *resv_map;
498 498
499 remove_inode_hugepages(inode, 0, LLONG_MAX); 499 remove_inode_hugepages(inode, 0, LLONG_MAX);
500 resv_map = (struct resv_map *)inode->i_mapping->private_data; 500
501 /* root inode doesn't have the resv_map, so we should check it */ 501 /*
502 * Get the resv_map from the address space embedded in the inode.
503 * This is the address space which points to any resv_map allocated
504 * at inode creation time. If this is a device special inode,
505 * i_mapping may not point to the original address space.
506 */
507 resv_map = (struct resv_map *)(&inode->i_data)->private_data;
508 /* Only regular and link inodes have associated reserve maps */
502 if (resv_map) 509 if (resv_map)
503 resv_map_release(&resv_map->refs); 510 resv_map_release(&resv_map->refs);
504 clear_inode(inode); 511 clear_inode(inode);