Generalized divisors and total reflexivity