diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-04-16 15:30:54 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-04-16 15:30:54 -0300 |
commit | bdcfd44fb5b5fb8fd660e7f93f1095c507481024 (patch) | |
tree | e423b07154d422b711ddfadedb87c43317d3c4f6 /fs/exfat | |
parent | 4a327fcef90ba27150a3e8741441b68c605ae248 (diff) |
Linux-libre 4.5.1-gnupck-4.5.1-gnu
Diffstat (limited to 'fs/exfat')
-rw-r--r-- | fs/exfat/exfat_super.c | 23 |
1 files changed, 20 insertions, 3 deletions
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); |