Small cleanups for do_path_lookup (V2)
cover Small cleanups for do_path_lookup (V2)
(For changes since V1, see the end of this email.)
The following 2 patches are trivial cleanups to do_path_lookup in namei.c. Since these changes are trivial, they can go into 2.6.22-rc1 without any problems.
Josef 'Jeff' Sipek (2):
fs: Fix indentation in do_path_lookup
fs: Use path_walk in do_path_lookup
diffstat for good measure:
fs/namei.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-)
Josef 'Jeff' Sipek.
Changes since V1:
- Fixed up audit_inode condition (hch)
PATCH 1/2 fs: Fix indentation in do_path_lookup
--- fs/namei.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
fs/namei.c +1 -3
@@ -1159,11 +1159,9 @@ static int fastcall do_path_lookup(int dfd, const char *name, current->total_link_count =0 ; retval =link_path_walk (name, nd); out: -if (likely (retval ==0 )) { -if (unlikely (!audit_dummy_context () && nd && nd->dentry && +if (unlikely (!retval && !audit_dummy_context () && nd->dentry && nd->dentry->d_inode))audit_inode (name, nd->dentry->d_inode); - } out_fail:return retval;
Signature · 1 line
1.5.2.rc1.20.g86b9
PATCH 2/2 fs: Use path_walk in do_path_lookup
In reply to Josef 'Jeff' SipekSince, path_walk sets the total_link_count to 0, and calls link_path_walk, we can just call path_walk directly.
--- fs/namei.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
fs/namei.c +2 -2
@@ -1156,8 +1156,8 @@ static int fastcall do_path_lookup(int dfd, const char *name,fput_light (file, fput_needed); } - current->total_link_count =0 ; - retval =link_path_walk (name, nd); + + retval =path_walk (name, nd); out:if (unlikely (!retval && !audit_dummy_context () && nd->dentry && nd->dentry->d_inode))
Signature · 1 line
1.5.2.rc1.20.g86b9
Quoted 9 lines · Josef 'Jeff' Sipek
(For changes since V1, see the end of this email.)
The following 2 patches are trivial cleanups to
do_path_lookupinnamei.c. Since these changes are trivial, they can go into 2.6.22-rc1 without any problems.Josef 'Jeff' Sipek (2):
fs: Fix indentation indo_path_lookup
fs: Usepath_walkindo_path_lookup
Ok for both patches.