All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
Allaah did not say that all mankind –including the pious people –will enter Hellfire, and this is not mentioned in any text in the Book of Allaah or the Sunnah of the Prophet ; rather, it is the opposite that is mentioned. Allaah Says about the Hellfire (what means): {Indeed, those for whom the best [reward] has preceded from Us- they are from it [Hellfire] far removed.}[Quran 21:101]
Furthermore, the Prophet said: “Allaah has protected from the Hellfire whoever said ‘La ilaaha illa Allaah’ (None has the right to be worshipped but Allaah) seeking the reward from Allaah for saying it.” [Al-Bukhari and Muslim]
However, we have not come across the narration which you mentioned in the question that it was reported by Al-Bukhari . The numbering of the narrations may differ according to the difference of copies unless you mean the narration on the authority of Abu Hurayrah that the Prophet said: “No Muslim whose three children die will enter Hellfire except for Allaah's oath [i.e. everyone has to pass over the Siraat (the bridge over Hellfire)]." This is the same as the Saying of Allaah (which means): {And there is none of you except he will come to it. This is upon your Lord inevitability decreed.}[Quran 19:71]
What is meant by the verse is the passing over the Siraat which is an extended bridge over Hellfire upon which the people will pass, and Allaah will save the pious and they will not be harmed whereas the criminals (disbelievers) will fall into it.
Allaah is the Most Just and He does not wrong anyone. Even the scholars who said that what is meant by the verse is that the people will enter Hellfire, they are of the view that they will not enter it as a means of punishment but the Fire will be on them cool and safe.
Allaah Knows best.