Apply ufs_extattr.c 1.48:
Explain why the lock in here needs to be recursive. Related to PR 46997. ufs_extattr 1.47 was also committed directly here, so this file is still fully synced with it.
This commit is contained in:
parent
5cbfa154c2
commit
7b5c072bc8
|
@ -1,5 +1,5 @@
|
|||
/* $NetBSD: ulfs_extattr.c,v 1.13 2016/07/07 06:55:44 msaitoh Exp $ */
|
||||
/* from NetBSD: ufs_extattr.c,v 1.46 2014/11/19 16:26:47 manu Exp */
|
||||
/* $NetBSD: ulfs_extattr.c,v 1.14 2016/11/09 05:44:42 dholland Exp $ */
|
||||
/* from NetBSD: ulfs_extattr.c,v 1.48 2016/11/09 05:08:35 dholland Exp */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999-2002 Robert N. M. Watson
|
||||
|
@ -49,7 +49,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ulfs_extattr.c,v 1.13 2016/07/07 06:55:44 msaitoh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ulfs_extattr.c,v 1.14 2016/11/09 05:44:42 dholland Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_lfs.h"
|
||||
|
@ -168,7 +168,13 @@ static void
|
|||
ulfs_extattr_uepm_lock(struct ulfsmount *ump)
|
||||
{
|
||||
|
||||
/* XXX Why does this need to be recursive? */
|
||||
/*
|
||||
* XXX This needs to be recursive for the following reasons:
|
||||
* - it is taken in ulfs_extattr_vnode_inactive
|
||||
* - which is called from VOP_INACTIVE
|
||||
* - which can be triggered by any vrele, vput, or vn_close
|
||||
* - several of these can happen while it's held
|
||||
*/
|
||||
if (mutex_owned(&ump->um_extattr.uepm_lock)) {
|
||||
ump->um_extattr.uepm_lockcnt++;
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue