]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/open.c
xps: Transmit Packet Steering
[net-next-2.6.git] / fs / open.c
index d74e1983e8dc478145dc8da369c0479bb947d8c2..4197b9ed023d8d1b1831ddf8f706d2a34a934aa6 100644 (file)
--- a/fs/open.c
+++ b/fs/open.c
@@ -786,11 +786,11 @@ struct file *nameidata_to_filp(struct nameidata *nd)
        /* Pick up the filp from the open intent */
        filp = nd->intent.open.file;
        /* Has the filesystem initialised the file for us? */
-       if (filp->f_path.dentry == NULL)
+       if (filp->f_path.dentry == NULL) {
+               path_get(&nd->path);
                filp = __dentry_open(nd->path.dentry, nd->path.mnt, filp,
                                     NULL, cred);
-       else
-               path_put(&nd->path);
+       }
        return filp;
 }