diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2000-07-14 11:52:56 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2000-07-14 11:52:56 +0000 |
commit | 729fe7fb1fd97dc161e5273b595a8a6caaee86f4 (patch) | |
tree | 30423896496c5de4a5facaef97ab2ae53516106a /sys/fs/msdosfs | |
parent | b436e363443a1a03f98797ed042606d9b80e8f7e (diff) | |
download | FreeBSD-src-729fe7fb1fd97dc161e5273b595a8a6caaee86f4.zip FreeBSD-src-729fe7fb1fd97dc161e5273b595a8a6caaee86f4.tar.gz |
Certain error contitions cause msdosfs_rename() to decrement the
vnode reference count on 'fdvp' more times than it should.
PR: 17347
Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
Approved by: bde
Diffstat (limited to 'sys/fs/msdosfs')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vnops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index a5c4365..10ebaf8 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -1093,7 +1093,6 @@ abortit: VOP_UNLOCK(fvp, 0, p); if (VTODE(fdvp)->de_StartCluster != VTODE(tdvp)->de_StartCluster) newparent = 1; - vrele(fdvp); if (doingdirectory && newparent) { if (error) /* write access check above */ goto bad; @@ -1161,7 +1160,8 @@ abortit: panic("msdosfs_rename: lost from startdir"); if (!newparent) VOP_UNLOCK(tdvp, 0, p); - (void) relookup(fdvp, &fvp, fcnp); + if (relookup(fdvp, &fvp, fcnp) == 0) + vrele(fdvp); if (fvp == NULL) { /* * From name has disappeared. |