Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/fs/smbfs Fix vnode locking changes in rev.1.89:



details:   https://anonhg.NetBSD.org/src/rev/16c91ebae043
branches:  trunk
changeset: 803667:16c91ebae043
user:      nakayama <nakayama%NetBSD.org@localhost>
date:      Fri Nov 07 12:05:58 2014 +0000

description:
Fix vnode locking changes in rev.1.89:
- lock vnode by the end of cache_purge and vput.

diffstat:

 sys/fs/smbfs/smbfs_vnops.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 197a90e4f39d -r 16c91ebae043 sys/fs/smbfs/smbfs_vnops.c
--- a/sys/fs/smbfs/smbfs_vnops.c        Fri Nov 07 11:54:18 2014 +0000
+++ b/sys/fs/smbfs/smbfs_vnops.c        Fri Nov 07 12:05:58 2014 +0000
@@ -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 @@
                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 @@
                else if (error == 0
                        && vattr.va_ctime.tv_sec == VTOSMB(newvp)->n_ctime)
                {
+                       if (newvp != dvp)
+                               VOP_UNLOCK(newvp);
                        /* nfsstats.lookupcache_hits++; */
                        return (0);
                }



Home | Main Index | Thread Index | Old Index