From 46c3d3ac99dbc1b05ddab13d897bf3c41d785206 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 3 Jun 2015 20:48:00 +0000 Subject: [PATCH] Syncing a directory vnode might drop the vnode lock in the softdep_sync() similarly to the regular vnode sync. Allow retry for both vnode types. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/ufs/ffs/ffs_vnops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 80f32697d82..618ed8e77d4 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -201,8 +201,8 @@ retry: * bo_dirty list. Recheck and resync as needed. */ BO_LOCK(bo); - if (vp->v_type == VREG && (bo->bo_numoutput > 0 || - bo->bo_dirty.bv_cnt > 0)) { + if ((vp->v_type == VREG || vp->v_type == VDIR) && + (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0)) { BO_UNLOCK(bo); goto retry; }