- Only return 1 from sync_vnode() in cases where the vnode is still

at the head of the sync list.  This prevents sched_sync() from
   re-queueing a vnode which may have been freed already.

Discussed with:	kib
This commit is contained in:
Jeff Roberson 2008-03-23 01:44:28 +00:00
parent 807e684076
commit e6b2545b3b

View File

@ -1664,7 +1664,7 @@ restart:
vdrop(vp);
VFS_UNLOCK_GIANT(vfslocked);
mtx_lock(&sync_mtx);
return (1);
return (*bo == LIST_FIRST(slp));
}
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
(void) VOP_FSYNC(vp, MNT_LAZY, td);