summaryrefslogtreecommitdiff
path: root/security/smack
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2013-03-11 05:54:48 +0400
committerJames Morris <james.l.morris@oracle.com>2013-03-11 05:54:48 +0400
commit2c4cdf5950b1a7a9d731c03c56e2cea3bd8ca7b7 (patch)
treeed0cdc81e72343132da9f52620ec40391f6dcbed /security/smack
parent5b2660326039a32b28766cb4c1a8b1bdcfadc375 (diff)
parentf6161aa153581da4a3867a2d1a7caf4be19b6ec9 (diff)
downloadlinux-2c4cdf5950b1a7a9d731c03c56e2cea3bd8ca7b7.tar.xz
Merge tag 'v3.9-rc2' into next
Sync with Linus. Linux 3.9-rc2
Diffstat (limited to 'security/smack')
-rw-r--r--security/smack/smack_lsm.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 38be92ce901e..fa64740abb59 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -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)
- return 0;
-
- dp = file->f_dentry;
-
- if (dp->d_inode == NULL)
+ if (file == 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;