file_inode(f)->i_mapping is f->f_mapping
[linux-2.6-block.git] / drivers / gpu / drm / ttm / ttm_tt.c
index 077ae9b2865dcda4bb8d9e774a8b4a5cf498bc84..97542c35d6efa4ab2adde3b19af61f20f95e31be 100644 (file)
@@ -298,7 +298,7 @@ int ttm_tt_swapin(struct ttm_tt *ttm)
        swap_storage = ttm->swap_storage;
        BUG_ON(swap_storage == NULL);
 
-       swap_space = file_inode(swap_storage)->i_mapping;
+       swap_space = swap_storage->f_mapping;
 
        for (i = 0; i < ttm->num_pages; ++i) {
                from_page = shmem_read_mapping_page(swap_space, i);
@@ -347,7 +347,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage)
        } else
                swap_storage = persistent_swap_storage;
 
-       swap_space = file_inode(swap_storage)->i_mapping;
+       swap_space = swap_storage->f_mapping;
 
        for (i = 0; i < ttm->num_pages; ++i) {
                from_page = ttm->pages[i];