Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Sep 2015 08:48:25 +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: r287479 - head/sys/ufs/ffs
Message-ID:  <201509050848.t858mPut049434@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sat Sep  5 08:48:24 2015
New Revision: 287479
URL: https://svnweb.freebsd.org/changeset/base/287479

Log:
  Declare the writes around the call to VFS_SYNC() in
  softdep_ast_cleanup_proc().
  
  Tested by:	pho (previous version)
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

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

Modified: head/sys/ufs/ffs/ffs_softdep.c
==============================================================================
--- head/sys/ufs/ffs/ffs_softdep.c	Sat Sep  5 06:24:00 2015	(r287478)
+++ head/sys/ufs/ffs/ffs_softdep.c	Sat Sep  5 08:48:24 2015	(r287479)
@@ -13325,8 +13325,13 @@ softdep_ast_cleanup_proc(void)
 			if (softdep_excess_items(ump, D_NEWBLK) ||
 			    softdep_excess_items(ump, D_ALLOCDIRECT) ||
 			    softdep_excess_items(ump, D_ALLOCINDIR)) {
-				req = true;
-				VFS_SYNC(mp, MNT_WAIT);
+				error = vn_start_write(NULL, &mp, V_MNTREF |
+				    V_WAIT);
+				if (error == 0) {
+					req = true;
+					VFS_SYNC(mp, MNT_WAIT);
+					vn_finished_write(mp);
+				}
 			}
 			if ((td->td_pflags & TDP_KTHREAD) != 0 || !req)
 				break;



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