Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / fs / namei.c
index 4a36030..577bf13 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/fcntl.h>
 #include <linux/namei.h>
 #include <linux/proc_fs.h>
+#include <linux/vs_base.h>
 #include <linux/vserver/inode.h>
 #include <linux/vserver/debug.h>
 #include <asm/namei.h>
@@ -1791,8 +1792,14 @@ do_link:
        if (error)
                goto exit_dput;
        error = __do_follow_link(&path, nd);
-       if (error)
+       if (error) {
+               /* Does someone understand code flow here? Or it is only
+                * me so stupid? Anathema to whoever designed this non-sense
+                * with "intent.open".
+                */
+               release_open_intent(nd);
                return error;
+       }
        nd->flags &= ~LOOKUP_PARENT;
        if (nd->last_type == LAST_BIND)
                goto ok;