svn commit: r314053 - head/sys/kern

Warner Losh imp at FreeBSD.org
Tue Feb 21 18:56:08 UTC 2017


Author: imp
Date: Tue Feb 21 18:56:06 2017
New Revision: 314053
URL: https://svnweb.freebsd.org/changeset/base/314053

Log:
  Make the code match the comments: If we have ANY buf's that failed
  then return EAGAIN. The current code just returns that if the LAST buf
  failed.
  
  Reviewed by: kib@, trasz@
  Differential Revision: https://reviews.freebsd.org/D9677

Modified:
  head/sys/kern/vfs_default.c

Modified: head/sys/kern/vfs_default.c
==============================================================================
--- head/sys/kern/vfs_default.c	Tue Feb 21 18:49:51 2017	(r314052)
+++ head/sys/kern/vfs_default.c	Tue Feb 21 18:56:06 2017	(r314053)
@@ -718,8 +718,8 @@ loop2:
 			 * to write them out.
 			 */
 			TAILQ_FOREACH(bp, &bo->bo_dirty.bv_hd, b_bobufs)
-				if ((error = bp->b_error) == 0)
-					continue;
+				if ((error = bp->b_error) != 0)
+					break;
 			if (error == 0 && --maxretry >= 0)
 				goto loop1;
 			error = EAGAIN;


More information about the svn-src-all mailing list