LINUX: Sometimes let dentry_open handle refcounts
[openafs.git] / src / afs / LINUX / osi_compat.h
index 6087d43..dc2c26a 100644 (file)
@@ -526,10 +526,11 @@ afs_dentry_open(struct dentry *dp, struct vfsmount *mnt, int flags, const struct
     struct file *filp;
     path.mnt = mnt;
     path.dentry = dp;
+    /* note that dentry_open will path_get for us */
     filp = dentry_open(&path, flags, creds);
     return filp;
 #else
-    return dentry_open(dp, mnt, flags, creds);
+    return dentry_open(dget(dp), mntget(mnt), flags, creds);
 #endif
 }
 #endif