Module Name: src
Committed By: jdolecek
Date: Fri Mar 10 20:38:28 UTC 2017
Modified Files:
src/sys/ufs/ffs: ffs_vfsops.c
Log Message:
slightly rearrange the code for IMNT_WANTRDONLY + MNT_UPDATE case for
better readability, no functional change
To generate a diff of this commit:
cvs rdiff -u -r1.349 -r1.350 src/sys/ufs/ffs/ffs_vfsops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.349 src/sys/ufs/ffs/ffs_vfsops.c:1.350
--- src/sys/ufs/ffs/ffs_vfsops.c:1.349 Mon Mar 6 10:12:00 2017
+++ src/sys/ufs/ffs/ffs_vfsops.c Fri Mar 10 20:38:28 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vfsops.c,v 1.349 2017/03/06 10:12:00 hannken Exp $ */
+/* $NetBSD: ffs_vfsops.c,v 1.350 2017/03/10 20:38:28 jdolecek Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.349 2017/03/06 10:12:00 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.350 2017/03/10 20:38:28 jdolecek Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -573,20 +573,23 @@ ffs_mount(struct mount *mp, const char *
if (mp->mnt_flag & MNT_FORCE)
flags |= FORCECLOSE;
error = ffs_flushfiles(mp, flags, l);
- if (error == 0)
- error = UFS_WAPBL_BEGIN(mp);
- if (error == 0 &&
- ffs_cgupdate(ump, MNT_WAIT) == 0 &&
+ if (error)
+ return error;
+
+ error = UFS_WAPBL_BEGIN(mp);
+ if (error) {
+ DPRINTF("wapbl %d", error);
+ return error;
+ }
+
+ if (ffs_cgupdate(ump, MNT_WAIT) == 0 &&
fs->fs_clean & FS_WASCLEAN) {
if (mp->mnt_flag & MNT_SOFTDEP)
fs->fs_flags &= ~FS_DOSOFTDEP;
fs->fs_clean = FS_ISCLEAN;
(void) ffs_sbupdate(ump, MNT_WAIT);
}
- if (error) {
- DPRINTF("wapbl %d", error);
- return error;
- }
+
UFS_WAPBL_END(mp);
}