We used two-stage correlation analysis to find 27 significant SNPs associated with risk of mastitis, among which three SNPs (rs75762330, rs88640083, and rs20438858) were annotated to immune-regulated genes (PTK2B, SYK, and TNFRSF21). This evidence concerns the gene TNFRSF21 and mastitis.