summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_extattr.c
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2002-10-27 23:23:51 +0000
committeriedowse <iedowse@FreeBSD.org>2002-10-27 23:23:51 +0000
commit092b51aeec7dc966bbc8dcd2ac52a71641bd3a4c (patch)
tree108cb2e5b8eb5d44010c40e8836f65148d1d8565 /sys/kern/vfs_extattr.c
parent63fd5e16a0a756cdbce248375cf04f37156ea1f2 (diff)
downloadFreeBSD-src-092b51aeec7dc966bbc8dcd2ac52a71641bd3a4c.zip
FreeBSD-src-092b51aeec7dc966bbc8dcd2ac52a71641bd3a4c.tar.gz
Fix a case in kern_rename() where a vn_finished_write() call was
missed. This bug has been present since the vn_start_write() and vn_finished_write() calls were first added in revision 1.159. When the case is triggered, any attempts to create snapshots on the filesystem will deadlock and also prevent further write activity on that filesystem.
Diffstat (limited to 'sys/kern/vfs_extattr.c')
-rw-r--r--sys/kern/vfs_extattr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index 55aea6e..8e2d605 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -2755,7 +2755,7 @@ rename(td, uap)
int
kern_rename(struct thread *td, char *from, char *to, enum uio_seg pathseg)
{
- struct mount *mp;
+ struct mount *mp = NULL;
struct vnode *tvp, *fvp, *tdvp;
struct nameidata fromnd, tond;
int error;
@@ -2847,12 +2847,12 @@ out:
vrele(fvp);
}
vrele(tond.ni_startdir);
- vn_finished_write(mp);
ASSERT_VOP_UNLOCKED(fromnd.ni_dvp, "rename");
ASSERT_VOP_UNLOCKED(fromnd.ni_vp, "rename");
ASSERT_VOP_UNLOCKED(tond.ni_dvp, "rename");
ASSERT_VOP_UNLOCKED(tond.ni_vp, "rename");
out1:
+ vn_finished_write(mp);
if (fromnd.ni_startdir)
vrele(fromnd.ni_startdir);
if (error == -1)
OpenPOWER on IntegriCloud