Date: Sat, 10 May 2014 07:53:37 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265807 - stable/10/sys/fs/msdosfs Message-ID: <201405100753.s4A7rbc6077018@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sat May 10 07:53:36 2014 New Revision: 265807 URL: http://svnweb.freebsd.org/changeset/base/265807 Log: MFC r265275: Overwrite the de_Name for the directories on rename to correct the dot name. Modified: stable/10/sys/fs/msdosfs/msdosfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- stable/10/sys/fs/msdosfs/msdosfs_vnops.c Sat May 10 07:37:32 2014 (r265806) +++ stable/10/sys/fs/msdosfs/msdosfs_vnops.c Sat May 10 07:53:36 2014 (r265807) @@ -1240,6 +1240,17 @@ abortit: VOP_UNLOCK(fvp, 0); goto bad; } + /* + * If ip is for a directory, then its name should always + * be "." since it is for the directory entry in the + * directory itself (msdosfs_lookup() always translates + * to the "." entry so as to get a unique denode, except + * for the root directory there are different + * complications). However, we just corrupted its name + * to pass the correct name to createde(). Undo this. + */ + if ((ip->de_Attributes & ATTR_DIRECTORY) != 0) + bcopy(oldname, ip->de_Name, 11); ip->de_refcnt++; zp->de_fndoffset = from_diroffset; error = removede(zp, ip);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405100753.s4A7rbc6077018>