return 0;
 }
 
+/**
+ * path_get - get a reference to a path
+ * @path: path to get the reference to
+ *
+ * Given a path increment the reference count to the dentry and the vfsmount.
+ */
+void path_get(struct path *path)
+{
+       mntget(path->mnt);
+       dget(path->dentry);
+}
+EXPORT_SYMBOL(path_get);
+
 /**
  * path_put - put a reference to a path
  * @path: path to put the reference to
                if (retval)
                        goto fput_fail;
 
-               nd->path.mnt = mntget(file->f_path.mnt);
-               nd->path.dentry = dget(dentry);
+               nd->path = file->f_path;
+               path_get(&file->f_path);
 
                fput_light(file, fput_needed);
        }