poor excuse for a tmpfs_rdattach() function, based on rd.c