Let X be a Banach space and Z a closed subspace of a Banach space Y. Denote by L(X, Y) the space of all bounded linear operators from X to Y and by K(X, Y) its subspace of compact linear operators. Using Hahn-Banach extension operators corresponding to ideal projections, we prove that if either $X^{**}$ or $Y^{*}$ has the Radon-Nikodym property and K(X, Y) is an M-ideal (resp. an HB-subspace) in L(X, Y), then K(X, Z) is also an M-ideal (resp. HB-subspace) in L(X, Z). If L(X, Y) has property SU instead of being an M-ideal in L(X, Y) in the above, then K(X, Z) also has property SU in L(X, Z). If X is a Banach space such that $X^{*}$ has the metric compact approximation property with adjoint operators, then M-ideal (resp. HB-subspace) property of K(X, Y) in L(X, Y) is inherited to K(X, Z) in L(X, Z).