[SPARC64]: Fix {mc,smt}_capable().
[sfrench/cifs-2.6.git] / fs / namei.c
index 856b2f5da51d74928108430bf0f6b96d14d8394f..5e2d98d10c5d79220a7daa95be76a8ac0616df93 100644 (file)
@@ -1152,14 +1152,12 @@ 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 (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;
 
@@ -1721,7 +1719,7 @@ do_last:
         * It already exists.
         */
        mutex_unlock(&dir->d_inode->i_mutex);
-       audit_inode_update(path.dentry->d_inode);
+       audit_inode(pathname, path.dentry->d_inode);
 
        error = -EEXIST;
        if (flag & O_EXCL)