Long hair and Jiu-Jitsu don’t always go well together. If you don’t want any hair troubles, while rolling, the best is to have the most popular haircut in BJJ: the shaved head (minus the cauliflower ear):
If you have longer hair, you can do what Cris Cyborg does but that may be a bit too time consuming:
Shelly Doyle shares 3 hairstyles that always kept her hair secure while rolling! hopefully they can work for you too!