aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm/ttm_tt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_tt.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_tt.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 86d5b1745a45..90e23e0bfadb 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -332,7 +332,7 @@ void ttm_tt_destroy(struct ttm_tt *ttm)
332 ttm_tt_free_page_directory(ttm); 332 ttm_tt_free_page_directory(ttm);
333 } 333 }
334 334
335 if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTANT_SWAP) && 335 if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTENT_SWAP) &&
336 ttm->swap_storage) 336 ttm->swap_storage)
337 fput(ttm->swap_storage); 337 fput(ttm->swap_storage);
338 338
@@ -503,7 +503,7 @@ static int ttm_tt_swapin(struct ttm_tt *ttm)
503 page_cache_release(from_page); 503 page_cache_release(from_page);
504 } 504 }
505 505
506 if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTANT_SWAP)) 506 if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTENT_SWAP))
507 fput(swap_storage); 507 fput(swap_storage);
508 ttm->swap_storage = NULL; 508 ttm->swap_storage = NULL;
509 ttm->page_flags &= ~TTM_PAGE_FLAG_SWAPPED; 509 ttm->page_flags &= ~TTM_PAGE_FLAG_SWAPPED;
@@ -514,7 +514,7 @@ out_err:
514 return ret; 514 return ret;
515} 515}
516 516
517int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage) 517int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage)
518{ 518{
519 struct address_space *swap_space; 519 struct address_space *swap_space;
520 struct file *swap_storage; 520 struct file *swap_storage;
@@ -540,7 +540,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage)
540 return 0; 540 return 0;
541 } 541 }
542 542
543 if (!persistant_swap_storage) { 543 if (!persistent_swap_storage) {
544 swap_storage = shmem_file_setup("ttm swap", 544 swap_storage = shmem_file_setup("ttm swap",
545 ttm->num_pages << PAGE_SHIFT, 545 ttm->num_pages << PAGE_SHIFT,
546 0); 546 0);
@@ -549,7 +549,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage)
549 return PTR_ERR(swap_storage); 549 return PTR_ERR(swap_storage);
550 } 550 }
551 } else 551 } else
552 swap_storage = persistant_swap_storage; 552 swap_storage = persistent_swap_storage;
553 553
554 swap_space = swap_storage->f_path.dentry->d_inode->i_mapping; 554 swap_space = swap_storage->f_path.dentry->d_inode->i_mapping;
555 555
@@ -577,12 +577,12 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage)
577 ttm_tt_free_alloced_pages(ttm); 577 ttm_tt_free_alloced_pages(ttm);
578 ttm->swap_storage = swap_storage; 578 ttm->swap_storage = swap_storage;
579 ttm->page_flags |= TTM_PAGE_FLAG_SWAPPED; 579 ttm->page_flags |= TTM_PAGE_FLAG_SWAPPED;
580 if (persistant_swap_storage) 580 if (persistent_swap_storage)
581 ttm->page_flags |= TTM_PAGE_FLAG_PERSISTANT_SWAP; 581 ttm->page_flags |= TTM_PAGE_FLAG_PERSISTENT_SWAP;
582 582
583 return 0; 583 return 0;
584out_err: 584out_err:
585 if (!persistant_swap_storage) 585 if (!persistent_swap_storage)
586 fput(swap_storage); 586 fput(swap_storage);
587 587
588 return ret; 588 return ret;