From owner-svn-src-all@FreeBSD.ORG Mon Feb 23 20:56:28 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 263F3106566B; Mon, 23 Feb 2009 20:56:28 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 150898FC1A; Mon, 23 Feb 2009 20:56:28 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1NKuRGY035891; Mon, 23 Feb 2009 20:56:27 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1NKuR8v035890; Mon, 23 Feb 2009 20:56:27 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200902232056.n1NKuR8v035890@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 23 Feb 2009 20:56:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188954 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 23 Feb 2009 20:56:28 -0000 Author: trasz Date: Mon Feb 23 20:56:27 2009 New Revision: 188954 URL: http://svn.freebsd.org/changeset/base/188954 Log: Refactor, moving error checking outside of the 'if (mp->mnt_flag & MNT_SOFTDEP)' conditional. No functional changes. Reviewed by: kib Approved by: rwatson (mentor) Tested by: pho Sponsored by: FreeBSD Foundation Modified: head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Mon Feb 23 19:58:35 2009 (r188953) +++ head/sys/ufs/ffs/ffs_vfsops.c Mon Feb 23 20:56:27 2009 (r188954) @@ -1075,13 +1075,13 @@ ffs_unmount(mp, mntflags, td) vn_start_write(NULL, &mp, V_WAIT); } } - if (mp->mnt_flag & MNT_SOFTDEP) { - if ((error = softdep_flushfiles(mp, flags, td)) != 0) - goto fail; - } else { - if ((error = ffs_flushfiles(mp, flags, td)) != 0) - goto fail; - } + if (mp->mnt_flag & MNT_SOFTDEP) + error = softdep_flushfiles(mp, flags, td); + else + error = ffs_flushfiles(mp, flags, td); + if (error != 0) + goto fail; + UFS_LOCK(ump); if (fs->fs_pendingblocks != 0 || fs->fs_pendinginodes != 0) { printf("%s: unmount pending error: blocks %jd files %d\n",