From owner-svn-src-all@FreeBSD.ORG Sat May 10 07:56:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5329EAF5; Sat, 10 May 2014 07:56:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FFC5A2; Sat, 10 May 2014 07:56:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4A7u2c7077433; Sat, 10 May 2014 07:56:02 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4A7u26S077432; Sat, 10 May 2014 07:56:02 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405100756.s4A7u26S077432@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 10 May 2014 07:56:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265808 - stable/9/sys/fs/msdosfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2014 07:56:02 -0000 Author: kib Date: Sat May 10 07:56:01 2014 New Revision: 265808 URL: http://svnweb.freebsd.org/changeset/base/265808 Log: MFC r265275: Overwrite the de_Name for the directories on rename to correct the dot name. Modified: stable/9/sys/fs/msdosfs/msdosfs_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- stable/9/sys/fs/msdosfs/msdosfs_vnops.c Sat May 10 07:53:36 2014 (r265807) +++ stable/9/sys/fs/msdosfs/msdosfs_vnops.c Sat May 10 07:56:01 2014 (r265808) @@ -1219,6 +1219,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);