ntfs - Set CNP_PDIRUNLOCK flag if we unlock the parent dir.
authorAntonio Huete Jimenez <tuxillo@quantumachine.net>
Tue, 19 Jun 2012 22:05:41 +0000 (00:05 +0200)
committerAntonio Huete Jimenez <tuxillo@quantumachine.net>
Tue, 19 Jun 2012 22:05:41 +0000 (00:05 +0200)
If we unlocked the parent dir, we must specify it via CNP_PDIRUNLOCK
flag to avoid further vn_unlock attempts.

DragonFly-bug: http://bugs.dragonflybsd.org/issues/2388

Reported by: swildner, Raimundo Santos

sys/vfs/ntfs/ntfs_vnops.c

index 557d645..277aa60 100644 (file)
@@ -754,8 +754,10 @@ ntfs_lookup(struct vop_old_lookup_args *ap)
                dprintf(("ntfs_lookup: found ino: %u\n",
                        (uint32_t)VTONT(*ap->a_vpp)->i_number));
 
-               if (!lockparent)
+               if (!lockparent) {
                        VOP__UNLOCK(dvp, 0);
+                       cnp->cn_flags |= CNP_PDIRUNLOCK;
+               }
        }
        return (error);
 }