]> err.no Git - linux-2.6/blobdiff - fs/namei.c
sys_fallocate() implementation on i386, x86_64 and powerpc
[linux-2.6] / fs / namei.c
index 19f178ec5744f9c62fe8a6637bb313bfe6b7779c..defaa47c11d4e7a1de0d926bc659fd8a03df2d27 100644 (file)
@@ -1152,8 +1152,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))
@@ -1576,7 +1576,7 @@ int may_open(struct nameidata *nd, int acc_mode, int flag)
 
        /* O_NOATIME can only be set by the owner or superuser */
        if (flag & O_NOATIME)
-               if (current->fsuid != inode->i_uid && !capable(CAP_FOWNER))
+               if (!is_owner_or_cap(inode))
                        return -EPERM;
 
        /*
@@ -1719,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)