diff options
author | kib <kib@FreeBSD.org> | 2015-06-19 07:25:15 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-06-19 07:25:15 +0000 |
commit | f69fd0ed6d9cc35a9874eddf3c559c601786d3ee (patch) | |
tree | f311a9c95127169d754f3f16222a627a88f107db /sys | |
parent | 2aa336795a692258f62c9319a25636837758d81b (diff) | |
download | FreeBSD-src-f69fd0ed6d9cc35a9874eddf3c559c601786d3ee.zip FreeBSD-src-f69fd0ed6d9cc35a9874eddf3c559c601786d3ee.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/tmpfs/tmpfs_subr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index 5e2a825..6114608 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -1031,6 +1031,7 @@ tmpfs_dir_detach(struct vnode *vp, struct tmpfs_dirent *de) tmpfs_free_dirent(tmp, xde); } } + de->td_cookie = de->td_hash; } else RB_REMOVE(tmpfs_dir, head, de); |