diff --git a/fs/exfat/exfat_super.c b/fs/exfat/exfat_super.c index a003a72..02d4fd2 100644 --- a/fs/exfat/exfat_super.c +++ b/fs/exfat/exfat_super.c @@ -1359,7 +1359,19 @@ const struct inode_operations exfat_dir_inode_operations = { /*======================================================================*/ /* File Operations */ /*======================================================================*/ -#if LINUX_VERSION_CODE > KERNEL_VERSION(4,1,0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0) +static const char *exfat_get_link(struct dentry *dentry, struct inode *inode, struct delayed_call *done) +{ + struct exfat_inode_info *ei = EXFAT_I(inode); + if (ei->target != NULL) { + char *cookie = ei->target; + if (cookie != NULL) { + return (char *)(ei->target); + } + } + return NULL; +} +#elif LINUX_VERSION_CODE > KERNEL_VERSION(4,1,0) static const char *exfat_follow_link(struct dentry *dentry, void **cookie) { struct exfat_inode_info *ei = EXFAT_I(dentry->d_inode); @@ -1376,7 +1388,12 @@ static void *exfat_follow_link(struct dentry *dentry, struct nameidata *nd) const struct inode_operations exfat_symlink_inode_operations = { .readlink = generic_readlink, - .follow_link = exfat_follow_link, + #if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0) + .follow_link = exfat_follow_link, + #endif + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0) + .get_link = exfat_get_link, + #endif }; static int exfat_file_release(struct inode *inode, struct file *filp) @@ -1970,7 +1987,7 @@ static void exfat_evict_inode(struct inode *inode) if (!inode->i_nlink) i_size_write(inode, 0); invalidate_inode_buffers(inode); -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,80) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) end_writeback(inode); #else clear_inode(inode);