@@ -152,6 +152,9 @@ static int d_namespace_path(struct path *path, char *buf, char **name,
*name = res;
+ if (!connected)
+ error = disconnect(path, buf, name, flags, disconnected);
+
/* Handle two cases:
* 1. A deleted dentry && profile is not allowing mediation of deleted
* 2. On some filesystems, newly allocated dentries appear to the
@@ -164,9 +167,6 @@ static int d_namespace_path(struct path *path, char *buf, char **name,
goto out;
}
- if (!connected)
- error = disconnect(path, buf, name, flags, disconnected);
-
out:
/*
* Append "/" to the pathname. The root directory is a special
BugLink: http://bugs.launchpad.net/bugs/1615892 Signed-off-by: John Johansen <john.johansen@canonical.com> --- security/apparmor/path.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)