From: Eric Paris Date: Mon, 25 Apr 2011 17:15:55 +0000 (-0400) Subject: SMACK: smack_file_lock can use the struct path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=92f4250901476fcadc4f52ace36e453c61f5591d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git SMACK: smack_file_lock can use the struct path smack_file_lock has a struct path, so use that instead of only the dentry. Signed-off-by: Eric Paris Acked-by: Casey Schaufler --- diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index a3bdd1383928..410825a44392 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -1076,8 +1076,8 @@ static int smack_file_lock(struct file *file, unsigned int cmd) { struct smk_audit_info ad; - smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); - smk_ad_setfield_u_fs_path_dentry(&ad, file->f_path.dentry); + smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); + smk_ad_setfield_u_fs_path(&ad, file->f_path); return smk_curacc(file->f_security, MAY_WRITE, &ad); }