summaryrefslogtreecommitdiffstats
path: root/security/apparmor/include/apparmor.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2015-01-29 12:02:31 +0000
committerAl Viro <viro@zeniv.linux.org.uk>2015-02-22 11:38:39 -0500
commit7ac2856d99e8038d356767c81ef7f2e85d366441 (patch)
treef56b9d59ecbeeb69da6d4d7c2aeaa1cd7418b988 /security/apparmor/include/apparmor.h
parent44bdb5e5f6382ba88f7678d6f535f879324522ae (diff)
downloadlinux-7ac2856d99e8038d356767c81ef7f2e85d366441.tar.bz2
Apparmor: mediated_filesystem() should use dentry->d_sb not inode->i_sb
mediated_filesystem() should use dentry->d_sb not dentry->d_inode->i_sb and should avoid file_inode() also since it is really dealing with the path. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security/apparmor/include/apparmor.h')
-rw-r--r--security/apparmor/include/apparmor.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/include/apparmor.h b/security/apparmor/include/apparmor.h
index 97130f88838b..e4ea62663866 100644
--- a/security/apparmor/include/apparmor.h
+++ b/security/apparmor/include/apparmor.h
@@ -112,9 +112,9 @@ static inline unsigned int aa_dfa_null_transition(struct aa_dfa *dfa,
return aa_dfa_next(dfa, start, 0);
}
-static inline bool mediated_filesystem(struct inode *inode)
+static inline bool mediated_filesystem(struct dentry *dentry)
{
- return !(inode->i_sb->s_flags & MS_NOUSER);
+ return !(dentry->d_sb->s_flags & MS_NOUSER);
}
#endif /* __APPARMOR_H */