diff options
author | Robert Watson <rwatson@FreeBSD.org> | 2008-01-19 15:39:10 +0000 |
---|---|---|
committer | Robert Watson <rwatson@FreeBSD.org> | 2008-01-19 15:39:10 +0000 |
commit | 96b1e9b015d88946872dceef86c1d9859704cce8 (patch) | |
tree | 3fb9f17243cb70d01abff007ac9dedfc11dfb8ec /sys/fs | |
parent | 76898521e81b3a67ab47d253129fe948059ed6d0 (diff) | |
download | src-96b1e9b015d88946872dceef86c1d9859704cce8.tar.gz src-96b1e9b015d88946872dceef86c1d9859704cce8.zip |
Don't acquire an additional vnode reference to a vnode when it is opened
and then release it when it is closed: we rely on the caller to keep the
vnode around with a valid reference. This avoids vrele() destroying the
vnode vop_close() is being called from during a call to vop_close(), and
a crash due to lockmgr recursing the vnode lock when a Coda unmount
occurs.
MFC after: 3 days
Notes
Notes:
svn path=/head/; revision=175478
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/coda/coda_vnops.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/sys/fs/coda/coda_vnops.c b/sys/fs/coda/coda_vnops.c index 2a9f65191561..a349bd83488b 100644 --- a/sys/fs/coda/coda_vnops.c +++ b/sys/fs/coda/coda_vnops.c @@ -221,9 +221,6 @@ coda_open(struct vop_open_args *ap) CODADEBUG( CODA_OPEN,myprintf(("open: vp %p result %d\n", vp, error));) - /* Keep a reference until the close comes in. */ - vref(*vpp); - /* Save the vnode pointer for the cache file. */ if (cp->c_ovp == NULL) { cp->c_ovp = vp; @@ -293,8 +290,6 @@ coda_close(struct vop_close_args *ap) error = venus_close(vtomi(vp), &cp->c_fid, flag, cred, td->td_proc); else error = ENODEV; - vrele(vp); - CODADEBUG(CODA_CLOSE, myprintf(("close: result %d\n",error)); ) return(error); } |