Skip to content
Snippets Groups Projects
Commit 7f718340 authored by Yuri.Sh's avatar Yuri.Sh
Browse files

Merge pull request #82 from ryleyangus/master

Update symlink support for Linux 4.5
parents 42635ed1 ad0ea8c6
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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);
Loading
Loading
@@ -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)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment