Personally I'd have kept him to be cautious, but I can see why he was loaned. We had Bremer, Kalulu and Gatti, who are established central defenders. We had Cabal who is essentially a DLC. And Danilo as a 5th option if needed. Bremer and Cabal injuries later and we need someone. Selling Danilo just adds to depth problems.
I wonder what the terms of the loan even are, some you can't interrupt if it's pre-agreed. I'd definitely bring him back if it is an option, he needs no integration and doesn't complain.