apparmor: use task path helpers Signed-off-by: Nick Piggin <npiggin@xxxxxxxxx> --- BTW, argh! dcache_lock! Why does everything have to invent its own reverse path lookup crud and hide it away in its own code? Also, admire the rest of this beautiful function. --- security/apparmor/path.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) Index: linux-2.6/security/apparmor/path.c =================================================================== --- linux-2.6.orig/security/apparmor/path.c 2010-08-18 04:04:02.000000000 +1000 +++ linux-2.6/security/apparmor/path.c 2010-08-18 04:04:29.000000000 +1000 @@ -62,19 +62,14 @@ static int d_namespace_path(struct path int deleted, connected; int error = 0; - /* Get the root we want to resolve too */ + /* Get the root we want to resolve too, released below */ if (flags & PATH_CHROOT_REL) { /* resolve paths relative to chroot */ - read_lock(¤t->fs->lock); - root = current->fs->root; - /* released below */ - path_get(&root); - read_unlock(¤t->fs->lock); + get_fs_root(current->fs, &root); } else { /* resolve paths relative to namespace */ root.mnt = current->nsproxy->mnt_ns->root; root.dentry = root.mnt->mnt_root; - /* released below */ path_get(&root); } -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html