Date: Thu, 23 Jan 2020 06:20:58 +0000 (UTC) From: Kirk McKusick <mckusick@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357033 - stable/12/sys/ufs/ffs Message-ID: <202001230620.00N6Kwbc012180@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mckusick Date: Thu Jan 23 06:20:57 2020 New Revision: 357033 URL: https://svnweb.freebsd.org/changeset/base/357033 Log: MFC of 356714 Fix DIRCHG panic Modified: stable/12/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/12/sys/ufs/ffs/ffs_softdep.c Thu Jan 23 06:18:08 2020 (r357032) +++ stable/12/sys/ufs/ffs/ffs_softdep.c Thu Jan 23 06:20:57 2020 (r357033) @@ -9821,14 +9821,20 @@ handle_workitem_remove(dirrem, flags) /* * Move all dependencies waiting on the remove to complete * from the dirrem to the inode inowait list to be completed - * after the inode has been updated and written to disk. Any - * marked MKDIR_PARENT are saved to be completed when the .. ref - * is removed. + * after the inode has been updated and written to disk. + * + * Any marked MKDIR_PARENT are saved to be completed when the + * dotdot ref is removed unless DIRCHG is specified. For + * directory change operations there will be no further + * directory writes and the jsegdeps need to be moved along + * with the rest to be completed when the inode is free or + * stable in the inode free list. */ LIST_INIT(&dotdotwk); while ((wk = LIST_FIRST(&dirrem->dm_jwork)) != NULL) { WORKLIST_REMOVE(wk); - if (wk->wk_state & MKDIR_PARENT) { + if ((dirrem->dm_state & DIRCHG) == 0 && + wk->wk_state & MKDIR_PARENT) { wk->wk_state &= ~MKDIR_PARENT; WORKLIST_INSERT(&dotdotwk, wk); continue;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001230620.00N6Kwbc012180>