Skip to content

Commit

Permalink
Merge pull request #14 from Artemy-Mellanox/topic/pde_data
Browse files Browse the repository at this point in the history
Compilation fix for 5.17
  • Loading branch information
yosefe authored Feb 25, 2022
2 parents d047bdb + b356931 commit 7347045
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions kernel/xpmem_pfn.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
#define num_of_pages(v, s) \
(((offset_in_page(v) + (s)) + (PAGE_SIZE - 1)) >> PAGE_SHIFT)

#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
#define PDE_DATA(inode) ((PDE(inode)->data))
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)
#define pde_data(indoe) PDE_DATA(inode)
#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
#define pde_data(inode) ((PDE(inode)->data))
#endif

#if CONFIG_HUGETLB_PAGE
Expand Down Expand Up @@ -631,7 +633,7 @@ xpmem_unpin_procfs_show(struct seq_file *seq, void *offset)
static int
xpmem_unpin_procfs_open(struct inode *inode, struct file *file)
{
return single_open(file, xpmem_unpin_procfs_show, PDE_DATA(inode));
return single_open(file, xpmem_unpin_procfs_show, pde_data(inode));
}

#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
Expand Down

0 comments on commit 7347045

Please sign in to comment.