Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/smbfs Don't lock an already locked vnode.
details: https://anonhg.NetBSD.org/src/rev/be4ff5a14d79
branches: trunk
changeset: 328943:be4ff5a14d79
user: pooka <pooka%NetBSD.org@localhost>
date: Fri Apr 25 15:18:06 2014 +0000
description:
Don't lock an already locked vnode.
diffstat:
sys/fs/smbfs/smbfs_vnops.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r c64dd1226ee0 -r be4ff5a14d79 sys/fs/smbfs/smbfs_vnops.c
--- a/sys/fs/smbfs/smbfs_vnops.c Fri Apr 25 13:20:45 2014 +0000
+++ b/sys/fs/smbfs/smbfs_vnops.c Fri Apr 25 15:18:06 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: smbfs_vnops.c,v 1.89 2014/02/07 15:29:21 hannken Exp $ */
+/* $NetBSD: smbfs_vnops.c,v 1.90 2014/04/25 15:18:06 pooka 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.89 2014/02/07 15:29:21 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smbfs_vnops.c,v 1.90 2014/04/25 15:18:06 pooka Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1244,9 +1244,11 @@
}
newvp = *vpp;
- vn_lock(newvp, LK_SHARED | LK_RETRY);
+ if (newvp != dvp)
+ vn_lock(newvp, LK_SHARED | LK_RETRY);
error = VOP_GETATTR(newvp, &vattr, cnp->cn_cred);
- VOP_UNLOCK(newvp);
+ if (newvp != dvp)
+ VOP_UNLOCK(newvp);
/*
* If the file type on the server is inconsistent
* with what it was when we created the vnode,
Home |
Main Index |
Thread Index |
Old Index