From 61042b2c6438caa3f0002455b969557ae1cb6503 Mon Sep 17 00:00:00 2001 From: Suzuki Date: Tue, 7 Feb 2006 12:58:36 -0800 Subject: [PATCH] --- yaml --- r: 19975 b: refs/heads/master c: 3bc8414b079ec372485c99ed1f33c6c42ca9d756 h: refs/heads/master i: 19973: ad911caf4b51f37687852b9c0aaf26e1aad96eda 19971: 009b9d8f77f8769be17bb44924a07edcaa448777 19967: 2ae24708c9a70301c6f6e424c2f144f4ee911f14 v: v3 --- [refs] | 2 +- trunk/fs/namei.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 3e425f20e142..a605dc73a745 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c00a76aea339b427b47ddc28de06dee0a652e801 +refs/heads/master: 3bc8414b079ec372485c99ed1f33c6c42ca9d756 diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index faf61c35308c..e28de846c591 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -1119,9 +1119,11 @@ static int fastcall do_path_lookup(int dfd, const char *name, current->total_link_count = 0; retval = link_path_walk(name, nd); out: - if (unlikely(current->audit_context - && nd && nd->dentry && nd->dentry->d_inode)) + if (likely(retval == 0)) { + if (unlikely(current->audit_context && nd && nd->dentry && + nd->dentry->d_inode)) audit_inode(name, nd->dentry->d_inode, flags); + } return retval; fput_unlock_fail: