summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2008-03-23 01:44:28 +0000
committerjeff <jeff@FreeBSD.org>2008-03-23 01:44:28 +0000
commit8103d042fbc5493bdaa92b21536c617c3e281ad3 (patch)
tree9c64b6a7371383f2c67d7dac2b91b8678a00f425
parent124e0025d3e5fdaabcc1be6cf9564bf03d218a33 (diff)
downloadFreeBSD-src-8103d042fbc5493bdaa92b21536c617c3e281ad3.zip
FreeBSD-src-8103d042fbc5493bdaa92b21536c617c3e281ad3.tar.gz
- 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
-rw-r--r--sys/kern/vfs_subr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 7966687..27e8f04 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -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);
OpenPOWER on IntegriCloud