mm/hugetlb: use some helper functions to cleanup code
[linux-2.6-microblaze.git] / fs / hugetlbfs / inode.c
index 701c82c..c262566 100644 (file)
@@ -1435,7 +1435,7 @@ static int get_hstate_idx(int page_size_log)
 
        if (!h)
                return -1;
-       return h - hstates;
+       return hstate_index(h);
 }
 
 /*