We investigate spin Hall magnetoresistance (SMR) in heavy-metal (HM)/metallic-ferromagnet (FM) multilayers as a function of the FM thickness. We observe that the SMR is considerably modified when the FM layer is thinner than similar to 1.5 nm, which is a critical thickness of a FM for the absorption or reflection of spin current generated from the spin Hall effect in a HM. Moreover, the FM thickness dependence of the SMR in HM/FM/HM trilayer structures relies on the relative signs of the spin Hall angle in HMs, indicating that there is non-negligible interaction between the accumulated spins at each HM/FM interface. We propose an analytical model of the SMR in a HM/FM/HM trilayer by incorporating the spin transmission through the HM/FM interfaces and the resultant interaction in the FM layer, which can explain the variation of the SMR with the relative signs of the spin Hall angle in HMs.