summarylogtreecommitdiffstats
path: root/exfat_fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'exfat_fix.patch')
-rw-r--r--exfat_fix.patch44
1 files changed, 39 insertions, 5 deletions
diff --git a/exfat_fix.patch b/exfat_fix.patch
index 1bcb77a042a8..6bad9073bdc0 100644
--- a/exfat_fix.patch
+++ b/exfat_fix.patch
@@ -1,14 +1,48 @@
diff --git a/fs/exfat/exfat_super.c b/fs/exfat/exfat_super.c
-index a003a72..464de88 100644
+index a003a72..02d4fd2 100644
--- a/fs/exfat/exfat_super.c
+++ b/fs/exfat/exfat_super.c
-@@ -1375,8 +1375,7 @@ static void *exfat_follow_link(struct dentry *dentry, struct nameidata *nd)
- #endif
+@@ -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,
+ .readlink = generic_readlink,
- .follow_link = exfat_follow_link,
-+ .readlink = generic_readlink
++ #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);