Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jun 2015 07:25:16 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r284594 - head/sys/fs/tmpfs
Message-ID:  <201506190725.t5J7PG24056983@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Fri Jun 19 07:25:15 2015
New Revision: 284594
URL: https://svnweb.freebsd.org/changeset/base/284594

Log:
  Restore the td_cookie value for the tmpfs directory entry which was a
  dup entry, upon detach from the parent directory.  If the node is
  renamed, the entry is re-attached at the different directory, and
  invalud cookie value triggers assert (or corrupts directory rb tree,
  it seems).
  
  Reported by:	clusteradm (gjb, antoine)
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

Modified:
  head/sys/fs/tmpfs/tmpfs_subr.c

Modified: head/sys/fs/tmpfs/tmpfs_subr.c
==============================================================================
--- head/sys/fs/tmpfs/tmpfs_subr.c	Fri Jun 19 06:58:05 2015	(r284593)
+++ head/sys/fs/tmpfs/tmpfs_subr.c	Fri Jun 19 07:25:15 2015	(r284594)
@@ -1031,6 +1031,7 @@ tmpfs_dir_detach(struct vnode *vp, struc
 				tmpfs_free_dirent(tmp, xde);
 			}
 		}
+		de->td_cookie = de->td_hash;
 	} else
 		RB_REMOVE(tmpfs_dir, head, de);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506190725.t5J7PG24056983>