nullfs: stop special-casing directories in null_vptocnp

The previous code was forcing an expensive walk in vop_stdvptocnp,
which was causing performance issues on highly contended zfs.

No objections:	kib
MFC after:	2 weeks
This commit is contained in:
Mateusz Guzik 2016-09-06 21:22:03 +00:00
parent 0fbb017195
commit 2740551545

View File

@ -870,9 +870,6 @@ null_vptocnp(struct vop_vptocnp_args *ap)
struct ucred *cred = ap->a_cred; struct ucred *cred = ap->a_cred;
int error, locked; int error, locked;
if (vp->v_type == VDIR)
return (vop_stdvptocnp(ap));
locked = VOP_ISLOCKED(vp); locked = VOP_ISLOCKED(vp);
lvp = NULLVPTOLOWERVP(vp); lvp = NULLVPTOLOWERVP(vp);
vhold(lvp); vhold(lvp);