Date: Wed, 23 Mar 2016 09:58:52 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297206 - head/sys/ufs/ffs Message-ID: <201603230958.u2N9wqpF097247@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Wed Mar 23 09:58:51 2016 New Revision: 297206 URL: https://svnweb.freebsd.org/changeset/base/297206 Log: Fix locking mistake in softdep_waitidle(). The surrounding code expects that the loop is always exited with the SU lock owned, even on error. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Wed Mar 23 04:18:57 2016 (r297205) +++ head/sys/ufs/ffs/ffs_softdep.c Wed Mar 23 09:58:51 2016 (r297206) @@ -1937,9 +1937,9 @@ softdep_waitidle(struct mount *mp, int f vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); error = VOP_FSYNC(devvp, MNT_WAIT, td); VOP_UNLOCK(devvp, 0); + ACQUIRE_LOCK(ump); if (error != 0) break; - ACQUIRE_LOCK(ump); } ump->softdep_req = 0; if (i == SU_WAITIDLE_RETRIES && error == 0 && ump->softdep_deps != 0) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603230958.u2N9wqpF097247>