Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ffs slightly rearrange the code for IMNT_WANTRDONLY ...
details: https://anonhg.NetBSD.org/src/rev/ba84b087ef3c
branches: trunk
changeset: 352022:ba84b087ef3c
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Fri Mar 10 20:38:28 2017 +0000
description:
slightly rearrange the code for IMNT_WANTRDONLY + MNT_UPDATE case for
better readability, no functional change
diffstat:
sys/ufs/ffs/ffs_vfsops.c | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
diffs (50 lines):
diff -r 0dc1542da0a5 -r ba84b087ef3c sys/ufs/ffs/ffs_vfsops.c
--- a/sys/ufs/ffs/ffs_vfsops.c Fri Mar 10 20:27:31 2017 +0000
+++ b/sys/ufs/ffs/ffs_vfsops.c Fri Mar 10 20:38:28 2017 +0000
@@ -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 @@
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);
}
Home |
Main Index |
Thread Index |
Old Index