Skip to content
Snippets Groups Projects
Commit d8e5082e authored by Yuri.Sh's avatar Yuri.Sh Committed by GitHub
Browse files

Merge pull request #97 from evan-a-a/master

exfat_super: Update for kernel 4.9 compatibility
parents fa66ce3e 5d0464cd
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -1101,8 +1101,14 @@ out:
return err;
}
 
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
static int exfat_rename(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags)
#else
static int exfat_rename(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry)
#endif
{
struct inode *old_inode, *new_inode;
struct super_block *sb = old_dir->i_sb;
Loading
Loading
@@ -1110,6 +1116,11 @@ static int exfat_rename(struct inode *old_dir, struct dentry *old_dentry,
loff_t i_pos;
int err;
 
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
if (flags)
return -EINVAL;
#endif
__lock_super(sb);
 
DPRINTK("exfat_rename entered\n");
Loading
Loading
@@ -1293,7 +1304,11 @@ static int exfat_setattr(struct dentry *dentry, struct iattr *attr)
attr->ia_valid &= ~(ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET);
}
 
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
error = setattr_prepare(dentry, attr);
#else
error = inode_change_ok(inode, attr);
#endif
attr->ia_valid = ia_valid;
if (error)
return error;
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