From: Trond Myklebust Date: Tue, 18 Oct 2005 21:20:18 +0000 (-0700) Subject: VFS: Make link_path_walk set LOOKUP_CONTINUE before calling permission(). X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cdce5d6b94b6182f6d8a5b7b52923933e98cbc92;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git VFS: Make link_path_walk set LOOKUP_CONTINUE before calling permission(). This will allow nfs_permission() to perform additional optimizations when walking the path, by folding the ACCESS(MAY_EXEC) call on the directory into the lookup revalidation. Signed-off-by: Trond Myklebust --- diff --git a/fs/namei.c b/fs/namei.c index 0d1dff7d3d95..aaaa81036234 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -763,6 +763,7 @@ static fastcall int __link_path_walk(const char * name, struct nameidata *nd) struct qstr this; unsigned int c; + nd->flags |= LOOKUP_CONTINUE; err = exec_permission_lite(inode, nd); if (err == -EAGAIN) { err = permission(inode, MAY_EXEC, nd); @@ -815,7 +816,6 @@ static fastcall int __link_path_walk(const char * name, struct nameidata *nd) if (err < 0) break; } - nd->flags |= LOOKUP_CONTINUE; /* This does the actual lookups.. */ err = do_lookup(nd, &this, &next); if (err)