From owner-svn-src-head@freebsd.org Sat Oct 28 02:48:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91534E59597; Sat, 28 Oct 2017 02:48:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DCD8242; Sat, 28 Oct 2017 02:48:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9S2mbL0005629; Sat, 28 Oct 2017 02:48:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9S2mbHR005628; Sat, 28 Oct 2017 02:48:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201710280248.v9S2mbHR005628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 28 Oct 2017 02:48:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325050 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 325050 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Oct 2017 02:48:38 -0000 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; }