summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2010-09-23 18:40:01 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2010-09-23 18:40:01 +0000
commit80043065dda871c64532f98ee9a191407d938eca (patch)
tree0ed3846d6311d246280f47414897431f6788a535
parent391adfa80738d51c7fb886b192987657c196b339 (diff)
Change:
/* something */ if (error) { VOP_UNLOCK(); return; } VOP_UNLOCK(); to the clearer and shorter: VOP_UNLOCK(); if (error) return; ok thib@, jsing@ as part of a larger diff.
-rw-r--r--sys/msdosfs/msdosfs_vfsops.c8
-rw-r--r--sys/ufs/ext2fs/ext2fs_vfsops.c8
2 files changed, 6 insertions, 10 deletions
diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c
index 502fd89a945..7c6d21660b3 100644
--- a/sys/msdosfs/msdosfs_vfsops.c
+++ b/sys/msdosfs/msdosfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vfsops.c,v 1.57 2010/01/24 18:12:46 krw Exp $ */
+/* $OpenBSD: msdosfs_vfsops.c,v 1.58 2010/09/23 18:40:00 oga Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.48 1997/10/18 02:54:57 briggs Exp $ */
/*-
@@ -135,11 +135,9 @@ msdosfs_mount(struct mount *mp, const char *path, void *data,
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_ACCESS(devvp, VREAD | VWRITE,
p->p_ucred, p);
- if (error) {
- VOP_UNLOCK(devvp, 0, p);
- return (error);
- }
VOP_UNLOCK(devvp, 0, p);
+ if (error)
+ return (error);
}
pmp->pm_flags &= ~MSDOSFSMNT_RONLY;
}
diff --git a/sys/ufs/ext2fs/ext2fs_vfsops.c b/sys/ufs/ext2fs/ext2fs_vfsops.c
index cf74eff30ee..3cbdf8b8a98 100644
--- a/sys/ufs/ext2fs/ext2fs_vfsops.c
+++ b/sys/ufs/ext2fs/ext2fs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_vfsops.c,v 1.57 2010/09/10 16:34:09 thib Exp $ */
+/* $OpenBSD: ext2fs_vfsops.c,v 1.58 2010/09/23 18:40:00 oga Exp $ */
/* $NetBSD: ext2fs_vfsops.c,v 1.1 1997/06/11 09:34:07 bouyer Exp $ */
/*
@@ -226,11 +226,9 @@ ext2fs_mount(struct mount *mp, const char *path, void *data,
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_ACCESS(devvp, VREAD | VWRITE,
p->p_ucred, p);
- if (error) {
- VOP_UNLOCK(devvp, 0, p);
- return (error);
- }
VOP_UNLOCK(devvp, 0, p);
+ if (error)
+ return (error);
}
fs->e2fs_ronly = 0;
if (fs->e2fs.e2fs_state == E2FS_ISCLEAN)