OAKLAND, Calif. — Ex-Knick J.R. Smith was on the bench, having fouled out with 29.2 seconds left in overtime Sunday night, and watched with glee as the Cavaliers held on for a 95-93 victory in Game 2 of the NBA Finals.

Part of his happiness was avoiding being tagged the goat for his series of ill-advised fouls late in the game.

The Cavs survived Game 2 and all is good despite Smith’s erratic performance that saw him score 13 points, commit two turnovers and six fouls. So far it hasn’t been a good Finals for Smith, who was 3-of-13 in Cleveland’s Game 1 loss. He vowed to drive the ball more in Game 2 and did so, but shot just 5-of-13.

“Mostly I looked at it as my fault,” Smith said. “I had a lot of dumb fouls and turnovers. I put ourselves in a situation for us to lose that game. I lost my focus, but fortunately I have great teammates.”

As he sat on the bench watching the dramatic final seconds unfold with Matthew Dellavedova winning it with two late free throws, Smith crossed his fingers.

“I was thinking, ‘Please win this game,’ ’’ Smith said. “I don’t want the phone calls, the text messages, the Instagrams and tweets. I don’t need that.’’

Late in the fourth as the Warriors rallied from 11 down to force OT, Smith committed a backcourt foul on Stephen Curry, sending him to the line. Then Smith fouled Harrison Barnes on an easy layup. Late in OT, Curry deked and drew contact on Smith with 27 seconds left and Golden State down one. Smith’s foul put Curry on the line to give the Warriors a one-point lead. Smith was done, then but the Cavs weren’t.

Cavs starting center Timofey Mozgov doesn’t have his own podium on the court during the media availability sessions, as the rest of the starters do. The first Russian to ever play in the Finals, Mozgov’s grasp of English is still a lot shakier than his game. The former Knick barely was able to give interviews his rookie year in New York and he still can get flustered. In fact, during a live postgame interview on the Cavaliers Fox Sports telecast after Game 1, Mozgov accidentally answered a full question in Russian, and it became a YouTube hit.

Clearly, Mozgov lets his game do the talking and lets other talk for him. The 7-foot-1 center had a very strong Game 1 and followed it with a 17-point (5-for-8), 11-rebound outing in Game 2, though he didn’t play much in the second half. He finished with just 29:20 as coach David Blatt went with a small lineup.

Mozgov has been the best of the former Knicks in this series. Iman Shumpert had an up-and-down night, going 2-of-11 for seven points. But he had no turnovers and three steals.

According to a source, the Cavaliers made a big pitch at the trade deadline for Knicks point guard Pablo Prigioni . The Knicks instead dealt Prigioni to Houston with a trade exception for a package that included Alexey Shved and two second-rounders. Prigioni helped Houston in the wake of Patrick Beverly’s injury and could have come in handy for the Cavaliers after the loss of Kyrie Irving . … Warriors coach Steve Kerr’s wife, Margot, in a story in the San Francisco Chronicle, admitted she was scouring the housing market in New York last May, planning to relocate from San Diego. Margot is a native of Westchester. “It all turned on a dime,’’ she told the newspaper.