From owner-svn-src-all@FreeBSD.ORG Fri Nov 14 11:31:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D59A08B8; Fri, 14 Nov 2014 11:31:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2A9D878; Fri, 14 Nov 2014 11:31:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAEBVA5H086012; Fri, 14 Nov 2014 11:31:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAEBVAAu086011; Fri, 14 Nov 2014 11:31:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201411141131.sAEBVAAu086011@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 14 Nov 2014 11:31:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274501 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2014 11:31:10 -0000 Author: kib Date: Fri Nov 14 11:31:10 2014 New Revision: 274501 URL: https://svnweb.freebsd.org/changeset/base/274501 Log: In vfs_write_suspend_umnt(), if suspension cannot be established, do not forget to restore write ops count when returning the error. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Fri Nov 14 10:56:33 2014 (r274500) +++ head/sys/kern/vfs_vnops.c Fri Nov 14 11:31:10 2014 (r274501) @@ -1881,8 +1881,10 @@ vfs_write_suspend_umnt(struct mount *mp) for (;;) { vn_finished_write(mp); error = vfs_write_suspend(mp, 0); - if (error != 0) + if (error != 0) { + vn_start_write(NULL, &mp, V_WAIT); return (error); + } MNT_ILOCK(mp); if ((mp->mnt_kern_flag & MNTK_SUSPENDED) != 0) break;