summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2020-02-14 17:03:43 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2020-02-14 17:03:43 +0000
commiteadab136634dafcbb222d06b450afe141bc20fa6 (patch)
tree5ef865fc010397f3062546e79fb76b288149d24d /sys
parent77a96ecbc64631373454c6ec90ebce1103d9f1a4 (diff)
Call CURSIG() only once and pass that signal to the check in dounmount()
and to CLRSIG. OK mpi@ visa@
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/mfs/mfs_vfsops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/ufs/mfs/mfs_vfsops.c b/sys/ufs/mfs/mfs_vfsops.c
index a5081e1abdb..83dc83b87c5 100644
--- a/sys/ufs/mfs/mfs_vfsops.c
+++ b/sys/ufs/mfs/mfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfs_vfsops.c,v 1.57 2019/12/26 13:28:50 bluhm Exp $ */
+/* $OpenBSD: mfs_vfsops.c,v 1.58 2020/02/14 17:03:42 claudio Exp $ */
/* $NetBSD: mfs_vfsops.c,v 1.10 1996/02/09 22:31:28 christos Exp $ */
/*
@@ -167,7 +167,7 @@ mfs_start(struct mount *mp, int flags, struct proc *p)
struct vnode *vp = VFSTOUFS(mp)->um_devvp;
struct mfsnode *mfsp = VTOMFS(vp);
struct buf *bp;
- int sleepreturn = 0;
+ int sleepreturn = 0, sig;
while (1) {
while (1) {
@@ -189,10 +189,10 @@ mfs_start(struct mount *mp, int flags, struct proc *p)
* EINTR/ERESTART.
*/
if (sleepreturn != 0) {
+ sig = CURSIG(p);
if (vfs_busy(mp, VB_WRITE|VB_NOWAIT) ||
- dounmount(mp,
- (CURSIG(p) == SIGKILL) ? MNT_FORCE : 0, p))
- CLRSIG(p, CURSIG(p));
+ dounmount(mp, (sig == SIGKILL) ? MNT_FORCE : 0, p))
+ CLRSIG(p, sig);
sleepreturn = 0;
continue;
}