diff options
Diffstat (limited to 'security/apparmor/path.c')
-rw-r--r-- | security/apparmor/path.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/path.c b/security/apparmor/path.c index 35b394a75d76..71e0e3a15b9d 100644 --- a/security/apparmor/path.c +++ b/security/apparmor/path.c | |||
@@ -114,7 +114,7 @@ static int d_namespace_path(struct path *path, char *buf, int buflen, | |||
114 | * security_path hooks as a deleted dentry except without an inode | 114 | * security_path hooks as a deleted dentry except without an inode |
115 | * allocated. | 115 | * allocated. |
116 | */ | 116 | */ |
117 | if (d_unlinked(path->dentry) && path->dentry->d_inode && | 117 | if (d_unlinked(path->dentry) && d_is_positive(path->dentry) && |
118 | !(flags & PATH_MEDIATE_DELETED)) { | 118 | !(flags & PATH_MEDIATE_DELETED)) { |
119 | error = -ENOENT; | 119 | error = -ENOENT; |
120 | goto out; | 120 | goto out; |