What is the function of the relative pronoun in the clause?

Hermit crabs rely on a supply of empty mollusk shells that they inhabit.

A.
direct object

B.
object of a preposition

C.
subject

D.
possessive