Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Sep 2016 12:08:54 +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: r305599 - head/sys/ufs/ffs
Message-ID:  <201609081208.u88C8sVB017022@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Sep  8 12:08:54 2016
New Revision: 305599
URL: https://svnweb.freebsd.org/changeset/base/305599

Log:
  Do not leak transient ENOLCK error from flush_newblk_dep() loop.
  
  The buffer lock is retried on failed LK_SLEEPFAIL attempt, and error
  from the failed attempt is irrelevant.  But since there is path after
  retry which does not clear error, it is possible to return spurious
  error from the function.
  
  The issue resulted in a spurious failure of softdep_sync_buf(),
  causing further spurious failure of ffs_sync().
  
  In collaboration with:	pho
  Reviewed by:	mckusick
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks

Modified:
  head/sys/ufs/ffs/ffs_softdep.c

Modified: head/sys/ufs/ffs/ffs_softdep.c
==============================================================================
--- head/sys/ufs/ffs/ffs_softdep.c	Thu Sep  8 12:08:08 2016	(r305598)
+++ head/sys/ufs/ffs/ffs_softdep.c	Thu Sep  8 12:08:54 2016	(r305599)
@@ -12954,6 +12954,7 @@ flush_newblk_dep(vp, mp, lbn)
 			    LK_INTERLOCK, BO_LOCKPTR(bo));
 			if (error == ENOLCK) {
 				ACQUIRE_LOCK(ump);
+				error = 0;
 				continue; /* Slept, retry */
 			}
 			if (error != 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609081208.u88C8sVB017022>