Module Name:    src
Committed By:   andvar
Date:           Mon Jul 19 22:24:55 UTC 2021

Modified Files:
        src/sys/ufs/chfs: chfs_gc.c

Log Message:
NFC - if/else blocks start with the same mutex_exit, just move it up.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/ufs/chfs/chfs_gc.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/chfs/chfs_gc.c
diff -u src/sys/ufs/chfs/chfs_gc.c:1.10 src/sys/ufs/chfs/chfs_gc.c:1.11
--- src/sys/ufs/chfs/chfs_gc.c:1.10	Fri Jul 16 21:18:41 2021
+++ src/sys/ufs/chfs/chfs_gc.c	Mon Jul 19 22:24:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: chfs_gc.c,v 1.10 2021/07/16 21:18:41 andvar Exp $	*/
+/*	$NetBSD: chfs_gc.c,v 1.11 2021/07/19 22:24:55 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -232,15 +232,13 @@ chfs_gc_fetch_inode(struct chfs_mount *c
 				mutex_exit(&chmp->chm_lock_vnocache);
 				return NULL;
 			}
+			mutex_exit(&chmp->chm_lock_vnocache);
 			if (vc->state != VNO_STATE_CHECKEDABSENT) {
-				mutex_exit(&chmp->chm_lock_vnocache);
 				/* XXX why do we need the delay here?! */
 				KASSERT(mutex_owned(&chmp->chm_lock_mountfields));
 				cv_timedwait_sig(
 					&chmp->chm_gc_thread.gcth_wakeup,
 					&chmp->chm_lock_mountfields, mstohz(50));
-			} else {
-				mutex_exit(&chmp->chm_lock_vnocache);
 			}
 			return NULL;
 		}

Reply via email to