Module Name: src
Committed By: christos
Date: Thu Jul 10 15:15:54 UTC 2014
Modified Files:
src/sys/ufs/ffs: ffs_wapbl.c
Log Message:
CID 975226: hande error from UFS_WAPBL_BEGIN
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/ufs/ffs/ffs_wapbl.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_wapbl.c
diff -u src/sys/ufs/ffs/ffs_wapbl.c:1.26 src/sys/ufs/ffs/ffs_wapbl.c:1.27
--- src/sys/ufs/ffs/ffs_wapbl.c:1.26 Thu Jul 10 02:27:15 2014
+++ src/sys/ufs/ffs/ffs_wapbl.c Thu Jul 10 11:15:54 2014
@@ -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 <sys/cdefs.h>
-__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