svn commit: r325050 - head/sys/ufs/ffs
Mark Johnston
markj at FreeBSD.org
Sat Oct 28 02:48:38 UTC 2017
Author: markj
Date: Sat Oct 28 02:48:37 2017
New Revision: 325050
URL: https://svnweb.freebsd.org/changeset/base/325050
Log:
Remove workqueue items after updating the workqueue tail pointer.
When QUEUE_MACRO_DEBUG_TRASH is configured, the queue linkage fields
are trashed upon removal of the item, so be sure to only read them before
removing the item.
No functional change intended.
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Modified:
head/sys/ufs/ffs/ffs_softdep.c
Modified: head/sys/ufs/ffs/ffs_softdep.c
==============================================================================
--- head/sys/ufs/ffs/ffs_softdep.c Fri Oct 27 21:48:02 2017 (r325049)
+++ head/sys/ufs/ffs/ffs_softdep.c Sat Oct 28 02:48:37 2017 (r325050)
@@ -1535,10 +1535,10 @@ remove_from_worklist(wk)
struct ufsmount *ump;
ump = VFSTOUFS(wk->wk_mp);
- WORKLIST_REMOVE(wk);
if (ump->softdep_worklist_tail == wk)
ump->softdep_worklist_tail =
(struct worklist *)wk->wk_list.le_prev;
+ WORKLIST_REMOVE(wk);
ump->softdep_on_worklist -= 1;
}
@@ -1836,11 +1836,11 @@ process_worklist_item(mp, target, flags)
wake_worklist(wk);
add_to_worklist(wk, WK_HEAD);
}
- LIST_REMOVE(&sentinel, wk_list);
/* Sentinal could've become the tail from remove_from_worklist. */
if (ump->softdep_worklist_tail == &sentinel)
ump->softdep_worklist_tail =
(struct worklist *)sentinel.wk_list.le_prev;
+ LIST_REMOVE(&sentinel, wk_list);
PRELE(curproc);
return (matchcnt);
}
@@ -2894,7 +2894,6 @@ remove_from_journal(wk)
if (ump->softdep_journal_tail == wk)
ump->softdep_journal_tail =
(struct worklist *)wk->wk_list.le_prev;
-
WORKLIST_REMOVE(wk);
ump->softdep_on_journal -= 1;
}
More information about the svn-src-head
mailing list