Commit cdce5d6b94b6182f6d8a5b7b52923933e98cbc92
1 parent
6f926b5ba7
Exists in
master
and in
4 other branches
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 <Trond.Myklebust@netapp.com>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
fs/namei.c
... | ... | @@ -763,6 +763,7 @@ |
763 | 763 | struct qstr this; |
764 | 764 | unsigned int c; |
765 | 765 | |
766 | + nd->flags |= LOOKUP_CONTINUE; | |
766 | 767 | err = exec_permission_lite(inode, nd); |
767 | 768 | if (err == -EAGAIN) { |
768 | 769 | err = permission(inode, MAY_EXEC, nd); |
... | ... | @@ -815,7 +816,6 @@ |
815 | 816 | if (err < 0) |
816 | 817 | break; |
817 | 818 | } |
818 | - nd->flags |= LOOKUP_CONTINUE; | |
819 | 819 | /* This does the actual lookups.. */ |
820 | 820 | err = do_lookup(nd, &this, &next); |
821 | 821 | if (err) |