Then when he says, "but you are not in the flesh," he shows that those to whom he is speaking are immune from the prudence of the flesh. In regard to this he does three things.
First, he describes the state of believers, saying, "but you are not in the flesh." This makes it clear that he is not speaking about the nature of the flesh. For the Romans, to whom he was speaking, were mortal men clothed in flesh. Rather, he is taking flesh for the vices of the flesh: "flesh and blood cannot inherit the kingdom of God" (1 Cor 15:50). Hence he says "you are not in the flesh," i.e., you are not in the... vices of the flesh as though living according to the flesh: "living in the flesh, we do not wage war according to the flesh" (2 Cor 10:3). "But in the Spirit," i.e., you follow the Spirit: "I was in the Spirit on the Lord's day" (Rev 1:10).
Second, he appends a condition, saying, "if the Spirit of God dwells in you," namely, through love: "you are God's temple, and God's Spirit dwells in you" (1 Cor 3:16). He appends this condition because, even though they received the Holy Spirit in baptism, they might through a later sin have lost the Holy Spirit. Concerning this it is said that "he will not abide when iniquity comes in" (Wis 1:5).
Third, he shows that this condition should be found in them, saying, "but if any man has not the Spirit of Christ, he is not his." For just as that is not a bodily member which is not enlivened by the body's spirit, so he is not Christ's member who does not have the Spirit of Christ: "by this we know that we abide in him, because he has given us of his own Spirit" (1 John 4:13). It should be noted that the Spirit of Christ and of God the Father is the same; but he is called the Spirit of God the Father inasmuch as he proceeds from the Father, and the Spirit of Christ inasmuch as he proceeds from the Son. Hence the Lord always ascribes him to both, as in John, "but the Counselor, the Holy Spirit, whom the Father will send in my name" (John 14:26) and again: "when the Counselor comes whom I will send to you from the Father" (John 15:26).
Source: Commentary on Romans