new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -296,7 +296,7 @@ int ttm_tt_swapin(struct ttm_tt *ttm)
|
||||
swap_storage = ttm->swap_storage;
|
||||
BUG_ON(swap_storage == NULL);
|
||||
|
||||
swap_space = swap_storage->f_path.dentry->d_inode->i_mapping;
|
||||
swap_space = file_inode(swap_storage)->i_mapping;
|
||||
|
||||
for (i = 0; i < ttm->num_pages; ++i) {
|
||||
from_page = shmem_read_mapping_page(swap_space, i);
|
||||
@@ -345,7 +345,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage)
|
||||
} else
|
||||
swap_storage = persistent_swap_storage;
|
||||
|
||||
swap_space = swap_storage->f_path.dentry->d_inode->i_mapping;
|
||||
swap_space = file_inode(swap_storage)->i_mapping;
|
||||
|
||||
for (i = 0; i < ttm->num_pages; ++i) {
|
||||
from_page = ttm->pages[i];
|
||||
|
Reference in New Issue
Block a user