diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-03-09 02:28:30 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-12 05:24:32 +0300 |
commit | 3f7036a071b879da017eddaedb10fba173fdf1ff (patch) | |
tree | 2160617c1812915583de79d2ee85913eb247e2a4 /security/smack | |
parent | 2247386243747500977dc92b1ab833401303f9f0 (diff) | |
download | linux-3f7036a071b879da017eddaedb10fba173fdf1ff.tar.xz |
switch security_inode_getattr() to struct path *
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security/smack')
-rw-r--r-- | security/smack/smack_lsm.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index c934311812f1..1511965549b8 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -1034,19 +1034,16 @@ static int smack_inode_setattr(struct dentry *dentry, struct iattr *iattr) * * Returns 0 if access is permitted, an error code otherwise */ -static int smack_inode_getattr(struct vfsmount *mnt, struct dentry *dentry) +static int smack_inode_getattr(const struct path *path) { struct smk_audit_info ad; - struct path path; + struct inode *inode = path->dentry->d_inode; int rc; - path.dentry = dentry; - path.mnt = mnt; - smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); - smk_ad_setfield_u_fs_path(&ad, path); - rc = smk_curacc(smk_of_inode(dentry->d_inode), MAY_READ, &ad); - rc = smk_bu_inode(dentry->d_inode, MAY_READ, rc); + smk_ad_setfield_u_fs_path(&ad, *path); + rc = smk_curacc(smk_of_inode(inode), MAY_READ, &ad); + rc = smk_bu_inode(inode, MAY_READ, rc); return rc; } |