Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/ufs/ffs/ffs_wapbl.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/ufs/ffs/ffs_wapbl.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.26 retrieving revision 1.27 diff -u -p -r1.26 -r1.27 --- src/sys/ufs/ffs/ffs_wapbl.c 2014/07/10 06:27:15 1.26 +++ src/sys/ufs/ffs/ffs_wapbl.c 2014/07/10 15:15:54 1.27 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_wapbl.c,v 1.26 2014/07/10 06:27:15 dholland Exp $ */ +/* $NetBSD: ffs_wapbl.c,v 1.27 2014/07/10 15:15:54 christos Exp $ */ /*- * Copyright (c) 2003,2006,2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.26 2014/07/10 06:27:15 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.27 2014/07/10 15:15:54 christos Exp $"); #define WAPBL_INTERNAL @@ -351,20 +351,18 @@ ffs_wapbl_start(struct mount *mp) #endif if ((fs->fs_flags & FS_DOWAPBL) == 0) { - UFS_WAPBL_BEGIN(mp); + if ((error = UFS_WAPBL_BEGIN(mp)) != 0) + goto out; fs->fs_flags |= FS_DOWAPBL; error = ffs_sbupdate(ump, MNT_WAIT); if (error) { UFS_WAPBL_END(mp); - ffs_wapbl_stop(mp, MNT_FORCE); - return error; + goto out; } UFS_WAPBL_END(mp); error = wapbl_flush(mp->mnt_wapbl, 1); - if (error) { - ffs_wapbl_stop(mp, MNT_FORCE); - return error; - } + if (error) + goto out; } } else if (fs->fs_flags & FS_DOWAPBL) { fs->fs_fmod = 1; @@ -391,6 +389,9 @@ ffs_wapbl_start(struct mount *mp) } return 0; +out: + ffs_wapbl_stop(mp, MNT_FORCE); + return error; } int