From bdcfd44fb5b5fb8fd660e7f93f1095c507481024 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Sat, 16 Apr 2016 15:30:54 -0300 Subject: Linux-libre 4.5.1-gnu --- fs/exfat/exfat_super.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'fs/exfat/exfat_super.c') diff --git a/fs/exfat/exfat_super.c b/fs/exfat/exfat_super.c index a003a7212..02d4fd2c7 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); -- cgit v1.2.3-54-g00ecf