From eadab136634dafcbb222d06b450afe141bc20fa6 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Fri, 14 Feb 2020 17:03:43 +0000 Subject: Call CURSIG() only once and pass that signal to the check in dounmount() and to CLRSIG. OK mpi@ visa@ --- sys/ufs/mfs/mfs_vfsops.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys') 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; } -- cgit v1.2.3