mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
CRED: Use creds in file structs
Attach creds to file structs and discard f_uid/f_gid. file_operations::open() methods (such as hppfs_open()) should use file->f_cred rather than current_cred(). At the moment file->f_cred will be current_cred() at this point. Signed-off-by: David Howells <[email protected]> Reviewed-by: James Morris <[email protected]> Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
1d045980e1
commit
d76b0d9b2d
11 changed files with 31 additions and 27 deletions
|
|
@ -426,7 +426,7 @@ static int file_mode(int fmode)
|
|||
|
||||
static int hppfs_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
const struct cred *cred = current_cred();
|
||||
const struct cred *cred = file->f_cred;
|
||||
struct hppfs_private *data;
|
||||
struct vfsmount *proc_mnt;
|
||||
struct dentry *proc_dentry;
|
||||
|
|
@ -490,7 +490,7 @@ static int hppfs_open(struct inode *inode, struct file *file)
|
|||
|
||||
static int hppfs_dir_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
const struct cred *cred = current_cred();
|
||||
const struct cred *cred = file->f_cred;
|
||||
struct hppfs_private *data;
|
||||
struct vfsmount *proc_mnt;
|
||||
struct dentry *proc_dentry;
|
||||
|
|
|
|||
Loading…
Reference in a new issue