diff options
Diffstat (limited to 'arch/s390/mm/pgtable.c')
-rw-r--r-- | arch/s390/mm/pgtable.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 529a08838376..e4a4cefb92b3 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -256,6 +256,9 @@ void gmap_disable(struct gmap *gmap) | |||
256 | } | 256 | } |
257 | EXPORT_SYMBOL_GPL(gmap_disable); | 257 | EXPORT_SYMBOL_GPL(gmap_disable); |
258 | 258 | ||
259 | /* | ||
260 | * gmap_alloc_table is assumed to be called with mmap_sem held | ||
261 | */ | ||
259 | static int gmap_alloc_table(struct gmap *gmap, | 262 | static int gmap_alloc_table(struct gmap *gmap, |
260 | unsigned long *table, unsigned long init) | 263 | unsigned long *table, unsigned long init) |
261 | { | 264 | { |
@@ -267,14 +270,12 @@ static int gmap_alloc_table(struct gmap *gmap, | |||
267 | return -ENOMEM; | 270 | return -ENOMEM; |
268 | new = (unsigned long *) page_to_phys(page); | 271 | new = (unsigned long *) page_to_phys(page); |
269 | crst_table_init(new, init); | 272 | crst_table_init(new, init); |
270 | down_read(&gmap->mm->mmap_sem); | ||
271 | if (*table & _REGION_ENTRY_INV) { | 273 | if (*table & _REGION_ENTRY_INV) { |
272 | list_add(&page->lru, &gmap->crst_list); | 274 | list_add(&page->lru, &gmap->crst_list); |
273 | *table = (unsigned long) new | _REGION_ENTRY_LENGTH | | 275 | *table = (unsigned long) new | _REGION_ENTRY_LENGTH | |
274 | (*table & _REGION_ENTRY_TYPE_MASK); | 276 | (*table & _REGION_ENTRY_TYPE_MASK); |
275 | } else | 277 | } else |
276 | __free_pages(page, ALLOC_ORDER); | 278 | __free_pages(page, ALLOC_ORDER); |
277 | up_read(&gmap->mm->mmap_sem); | ||
278 | return 0; | 279 | return 0; |
279 | } | 280 | } |
280 | 281 | ||