Fix vnode locking changes in rev.1.89:
- lock vnode by the end of cache_purge and vput.
This commit is contained in:
parent
a656470b01
commit
bf71b4294d
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: smbfs_vnops.c,v 1.91 2014/07/25 08:20:52 dholland Exp $ */
|
||||
/* $NetBSD: smbfs_vnops.c,v 1.92 2014/11/07 12:05:58 nakayama Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
@ -64,7 +64,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: smbfs_vnops.c,v 1.91 2014/07/25 08:20:52 dholland Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: smbfs_vnops.c,v 1.92 2014/11/07 12:05:58 nakayama Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -1249,8 +1249,6 @@ smbfs_lookup(void *v)
|
||||
if (newvp != dvp)
|
||||
vn_lock(newvp, LK_SHARED | LK_RETRY);
|
||||
error = VOP_GETATTR(newvp, &vattr, cnp->cn_cred);
|
||||
if (newvp != dvp)
|
||||
VOP_UNLOCK(newvp);
|
||||
/*
|
||||
* If the file type on the server is inconsistent
|
||||
* with what it was when we created the vnode,
|
||||
@ -1267,6 +1265,8 @@ smbfs_lookup(void *v)
|
||||
else if (error == 0
|
||||
&& vattr.va_ctime.tv_sec == VTOSMB(newvp)->n_ctime)
|
||||
{
|
||||
if (newvp != dvp)
|
||||
VOP_UNLOCK(newvp);
|
||||
/* nfsstats.lookupcache_hits++; */
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user