Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/kern Pull up revision 1.174 (requested by enami):



details:   https://anonhg.NetBSD.org/src/rev/4784fe1c0455
branches:  netbsd-1-5
changeset: 493120:4784fe1c0455
user:      he <he%NetBSD.org@localhost>
date:      Thu Jun 06 19:53:07 2002 +0000

description:
Pull up revision 1.174 (requested by enami):
  Do not release the lock on the mount point vnode too early when
  doing an update mount, to avoid race conditionn and eventual
  panic.

diffstat:

 sys/kern/vfs_syscalls.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r fa2a22aedd2e -r 4784fe1c0455 sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c   Thu Jun 06 19:50:11 2002 +0000
+++ b/sys/kern/vfs_syscalls.c   Thu Jun 06 19:53:07 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_syscalls.c,v 1.158.2.2 2000/12/14 23:36:05 he Exp $        */
+/*     $NetBSD: vfs_syscalls.c,v 1.158.2.3 2002/06/06 19:53:07 he Exp $        */
 
 /*
  * Copyright (c) 1989, 1993
@@ -214,7 +214,6 @@
                        vput(vp);
                        return (EPERM);
                }                     
-               VOP_UNLOCK(vp, 0);
                goto update;
        } else {
                if (securelevel >= 2) {
@@ -320,7 +319,6 @@
         */
        error = VFS_MOUNT(mp, SCARG(uap, path), SCARG(uap, data), &nd, p);
        if (mp->mnt_flag & MNT_UPDATE) {
-               vrele(vp);
                if (mp->mnt_flag & MNT_WANTRDWR)
                        mp->mnt_flag &= ~MNT_RDONLY;
                mp->mnt_flag &=~
@@ -335,6 +333,8 @@
                                vfs_deallocate_syncvnode(mp);
                }
                vfs_unbusy(mp);
+               VOP_UNLOCK(vp, 0);
+               vrele(vp);
                return (error);
        }
        /*



Home | Main Index | Thread Index | Old Index