]> err.no Git - linux-2.6/blobdiff - fs/namei.c
[XFS] Ensure fsync does not incorrectly return EIO for pages beyond EOF.
[linux-2.6] / fs / namei.c
index 0d1dff7d3d95bb85d4b28bdd1b94b724730f11ba..c5769c4fcab185ea1996e947c5b910abfd155dd5 100644 (file)
@@ -763,6 +763,7 @@ static fastcall int __link_path_walk(const char * name, struct nameidata *nd)
                struct qstr this;
                unsigned int c;
 
+               nd->flags |= LOOKUP_CONTINUE;
                err = exec_permission_lite(inode, nd);
                if (err == -EAGAIN) { 
                        err = permission(inode, MAY_EXEC, nd);
@@ -815,7 +816,6 @@ static fastcall int __link_path_walk(const char * name, struct nameidata *nd)
                        if (err < 0)
                                break;
                }
-               nd->flags |= LOOKUP_CONTINUE;
                /* This does the actual lookups.. */
                err = do_lookup(nd, &this, &next);
                if (err)
@@ -1311,9 +1311,6 @@ static inline int may_create(struct inode *dir, struct dentry *child,
 }
 
 /* 
- * Special case: O_CREAT|O_EXCL implies O_NOFOLLOW for security
- * reasons.
- *
  * O_DIRECTORY translates into forcing a directory lookup.
  */
 static inline int lookup_flags(unsigned int f)
@@ -1323,9 +1320,6 @@ static inline int lookup_flags(unsigned int f)
        if (f & O_NOFOLLOW)
                retval &= ~LOOKUP_FOLLOW;
        
-       if ((f & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL))
-               retval &= ~LOOKUP_FOLLOW;
-       
        if (f & O_DIRECTORY)
                retval |= LOOKUP_DIRECTORY;