Just about every standard source does not mention this possibility but the O'Mahony Society suggests Canniff is a form of Mahony. I expect this would apply strictly to Cannif(fe) in West Cork, where there were two main settlements of Mahonys, Mizen Head and Kinalmeaky (Bandon).
Therefore you may want to expand your search using John Mahony.
Sources: Padriag Ó Mathúna. "Forms of the Name." The O Mahony Journal, No. 14, 1990, pages 23 - 25. Also Nora Hickey. "Tracing the O'Mahonys of the Diaspora: Research in Ireland." O'Mahony Society.
If someone had asked me a year ago whether people were switching back and forth from surname to agnomen in the late 1800's, I'd have said, naaaah. That was before I went through a nightmare looking for a Driscoll who was recorded as Cadogan in civil registration in 1880 and Driscoll in the church record. Family Search does not match agnomens.