Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/msdosfs pullup rev. 1.100 (approved by thorpej):
details: https://anonhg.NetBSD.org/src/rev/e1e8376391f8
branches: netbsd-1-5
changeset: 488806:e1e8376391f8
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sun Jul 30 09:53:58 2000 +0000
description:
pullup rev. 1.100 (approved by thorpej):
msdosfs_rename(): fix too many vrele()'s of fdvp in some error cases
bug and a fix found on OpenBSD, but implemented here more sane way.
This solves kern/10312 by Martin J.Laubach.
diffstat:
sys/msdosfs/msdosfs_vnops.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r 4dd78cbaf382 -r e1e8376391f8 sys/msdosfs/msdosfs_vnops.c
--- a/sys/msdosfs/msdosfs_vnops.c Sun Jul 30 09:39:50 2000 +0000
+++ b/sys/msdosfs/msdosfs_vnops.c Sun Jul 30 09:53:58 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs_vnops.c,v 1.97 2000/05/13 23:43:11 perseant Exp $ */
+/* $NetBSD: msdosfs_vnops.c,v 1.97.4.1 2000/07/30 09:53:58 jdolecek Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -930,6 +930,7 @@
struct msdosfsmount *pmp;
struct direntry *dotdotp;
struct buf *bp;
+ int fdvp_dorele = 0;
pmp = VFSTOMSDOSFS(fdvp->v_mount);
@@ -1098,6 +1099,7 @@
vrele(tdvp);
return 0;
}
+ fdvp_dorele = 1;
xp = VTODE(fvp);
zp = VTODE(fdvp);
from_diroffset = zp->de_fndoffset;
@@ -1206,7 +1208,8 @@
vput(tdvp);
out:
ip->de_flag &= ~DE_RENAME;
- vrele(fdvp);
+ if (fdvp_dorele)
+ vrele(fdvp);
vrele(fvp);
return (error);
Home |
Main Index |
Thread Index |
Old Index