diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2015-10-23 18:04:38 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2015-10-23 18:04:38 +0000 |
commit | 8a024999992d265925b4bae697832bb336459d4d (patch) | |
tree | 26ec51c683abae0e62de753a315c089b50db064c /sys | |
parent | df187bb4d3d77ac0699f67c0150cee78602ef92e (diff) |
Fix renaming in the root directory by correctly setting directory
offset.
From Serguey Parkhomovsky via bugs@, in response to problem report
from matthieu@. Same fix is in NetBSD for one.
ok tedu@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/msdosfs/msdosfs_vnops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index 55e50c259ca..d042cb13e56 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_vnops.c,v 1.103 2015/10/23 17:21:34 krw Exp $ */ +/* $OpenBSD: msdosfs_vnops.c,v 1.104 2015/10/23 18:04:37 krw Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */ /*- @@ -1191,8 +1191,9 @@ abortit: VOP_UNLOCK(fdvp, 0, p); goto bad; } + ip->de_diroffset = to_diroffset; if (ip->de_dirclust != MSDOSFSROOT) - ip->de_diroffset = to_diroffset & pmp->pm_crbomask; + ip->de_diroffset &= pmp->pm_crbomask; } reinsert(ip); if (newparent) |