Module Name:    src
Committed By:   manu
Date:           Thu Jul  7 14:56:45 UTC 2011

Modified Files:
        src/sys/ufs/ufs: ufs_extattr.c

Log Message:
Fix locking protocol to avoid a panic on extattrctl stop and on umount.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/ufs/ufs/ufs_extattr.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/ufs/ufs_extattr.c
diff -u src/sys/ufs/ufs/ufs_extattr.c:1.34 src/sys/ufs/ufs/ufs_extattr.c:1.35
--- src/sys/ufs/ufs/ufs_extattr.c:1.34	Mon Jul  4 08:07:32 2011
+++ src/sys/ufs/ufs/ufs_extattr.c	Thu Jul  7 14:56:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_extattr.c,v 1.34 2011/07/04 08:07:32 manu Exp $	*/
+/*	$NetBSD: ufs_extattr.c,v 1.35 2011/07/07 14:56:45 manu Exp $	*/
 
 /*-
  * Copyright (c) 1999-2002 Robert N. M. Watson
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_extattr.c,v 1.34 2011/07/04 08:07:32 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_extattr.c,v 1.35 2011/07/07 14:56:45 manu Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ffs.h"
@@ -133,6 +133,7 @@
 	if (ump->um_extattr.uepm_lockcnt != 0) {
 		KASSERT(mutex_owned(&ump->um_extattr.uepm_lock));
 		ump->um_extattr.uepm_lockcnt--;
+		return;
 	}
 	mutex_exit(&ump->um_extattr.uepm_lock);
 }

Reply via email to