The 28-year-old full-back, who has been in eye catching form since the Ospreys brought him back to Welsh rugby from Brive during the summer, had the operation on Friday and now faces a spell on the sidelines.
Physio Chris Towers explained: “Barry has failed to recover from a groin problem which has prevented him from training fully in recent weeks, through conservative treatment, so a decision was made in his best interests to opt for surgery.
“It was not a major procedure, and with an aggressive rehab programme over the next couple of weeks, he is only likely to be unavailable for selection for a period of two to four weeks.”