mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
new helper: file_inode(file)
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
57eccb830f
commit
496ad9aa8e
306 changed files with 696 additions and 717 deletions
|
|
@ -456,7 +456,7 @@ static int smack_sb_umount(struct vfsmount *mnt, int flags)
|
|||
*/
|
||||
static int smack_bprm_set_creds(struct linux_binprm *bprm)
|
||||
{
|
||||
struct inode *inode = bprm->file->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(bprm->file);
|
||||
struct task_smack *bsp = bprm->cred->security;
|
||||
struct inode_smack *isp;
|
||||
int rc;
|
||||
|
|
@ -1187,21 +1187,15 @@ static int smack_mmap_file(struct file *file,
|
|||
char *msmack;
|
||||
char *osmack;
|
||||
struct inode_smack *isp;
|
||||
struct dentry *dp;
|
||||
int may;
|
||||
int mmay;
|
||||
int tmay;
|
||||
int rc;
|
||||
|
||||
if (file == NULL || file->f_dentry == NULL)
|
||||
if (file == NULL)
|
||||
return 0;
|
||||
|
||||
dp = file->f_dentry;
|
||||
|
||||
if (dp->d_inode == NULL)
|
||||
return 0;
|
||||
|
||||
isp = dp->d_inode->i_security;
|
||||
isp = file_inode(file)->i_security;
|
||||
if (isp->smk_mmap == NULL)
|
||||
return 0;
|
||||
msmack = isp->smk_mmap;
|
||||
|
|
@ -1359,7 +1353,7 @@ static int smack_file_receive(struct file *file)
|
|||
*/
|
||||
static int smack_file_open(struct file *file, const struct cred *cred)
|
||||
{
|
||||
struct inode_smack *isp = file->f_path.dentry->d_inode->i_security;
|
||||
struct inode_smack *isp = file_inode(file)->i_security;
|
||||
|
||||
file->f_security = isp->smk_inode;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue