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
This commit is contained in:
Konstantin Belousov 2015-06-03 20:48:00 +00:00
parent 06d83c8266
commit 46c3d3ac99

View File

@ -201,8 +201,8 @@ ffs_fsync(struct vop_fsync_args *ap)
* 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;
}