update new sdk
This commit is contained in:
parent
f33907443a
commit
744c72c133
1643 changed files with 83006 additions and 28021 deletions
24
lichee/linux-4.9/fs/sdcardfs/file.c
Normal file → Executable file
24
lichee/linux-4.9/fs/sdcardfs/file.c
Normal file → Executable file
|
@ -115,7 +115,11 @@ static long sdcardfs_unlocked_ioctl(struct file *file, unsigned int cmd,
|
|||
goto out;
|
||||
|
||||
/* save current_cred and override it */
|
||||
OVERRIDE_CRED(sbi, saved_cred, SDCARDFS_I(file_inode(file)));
|
||||
saved_cred = override_fsids(sbi, SDCARDFS_I(file_inode(file))->data);
|
||||
if (!saved_cred) {
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (lower_file->f_op->unlocked_ioctl)
|
||||
err = lower_file->f_op->unlocked_ioctl(lower_file, cmd, arg);
|
||||
|
@ -124,7 +128,7 @@ static long sdcardfs_unlocked_ioctl(struct file *file, unsigned int cmd,
|
|||
if (!err)
|
||||
sdcardfs_copy_and_fix_attrs(file_inode(file),
|
||||
file_inode(lower_file));
|
||||
REVERT_CRED(saved_cred);
|
||||
revert_fsids(saved_cred);
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
@ -146,12 +150,16 @@ static long sdcardfs_compat_ioctl(struct file *file, unsigned int cmd,
|
|||
goto out;
|
||||
|
||||
/* save current_cred and override it */
|
||||
OVERRIDE_CRED(sbi, saved_cred, SDCARDFS_I(file_inode(file)));
|
||||
saved_cred = override_fsids(sbi, SDCARDFS_I(file_inode(file))->data);
|
||||
if (!saved_cred) {
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (lower_file->f_op->compat_ioctl)
|
||||
err = lower_file->f_op->compat_ioctl(lower_file, cmd, arg);
|
||||
|
||||
REVERT_CRED(saved_cred);
|
||||
revert_fsids(saved_cred);
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
@ -238,7 +246,11 @@ static int sdcardfs_open(struct inode *inode, struct file *file)
|
|||
}
|
||||
|
||||
/* save current_cred and override it */
|
||||
OVERRIDE_CRED(sbi, saved_cred, SDCARDFS_I(inode));
|
||||
saved_cred = override_fsids(sbi, SDCARDFS_I(inode)->data);
|
||||
if (!saved_cred) {
|
||||
err = -ENOMEM;
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
file->private_data =
|
||||
kzalloc(sizeof(struct sdcardfs_file_info), GFP_KERNEL);
|
||||
|
@ -268,7 +280,7 @@ static int sdcardfs_open(struct inode *inode, struct file *file)
|
|||
sdcardfs_copy_and_fix_attrs(inode, sdcardfs_lower_inode(inode));
|
||||
|
||||
out_revert_cred:
|
||||
REVERT_CRED(saved_cred);
|
||||
revert_fsids(saved_cred);
|
||||
out_err:
|
||||
dput(parent);
|
||||
return err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue