Commit a35d0e11 authored by Trond Myklebust's avatar Trond Myklebust

[PATCH] make create() follow symlinks again

   The intent patches broke behaviour w.r.t. following symlinks when
doing an open() with file creation. The problem occurs in open_namei()
because the LOOKUP_PARENT flag is no longer set when we do the call to
follow_link().
parent 62133cb1
......@@ -1344,6 +1344,7 @@ int open_namei(const char * pathname, int flag, int mode, struct nameidata *nd)
* stored in nd->last.name and we will have to putname() it when we
* are done. Procfs-like symlinks just set LAST_BIND.
*/
nd->flags |= LOOKUP_PARENT;
error = security_inode_follow_link(dentry, nd);
if (error)
goto exit_dput;
......@@ -1352,6 +1353,7 @@ int open_namei(const char * pathname, int flag, int mode, struct nameidata *nd)
dput(dentry);
if (error)
return error;
nd->flags &= ~LOOKUP_PARENT;
if (nd->last_type == LAST_BIND) {
dentry = nd->dentry;
goto ok;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment