When engine-kref.refcount becomes zero, engine is freed. No rcu, no
other delays. This means that if we see .refcount 1 we already have
a bug: we are reading the freed (and perhaps unmapped) memory.
Perhaps it makes sense to use BUG_ON() but return -EINVAL just hides
the problem and looks
Ok, applied. I thought I'd seen that checking style in some other kref
user and was copying its style (which is admittedly a dubious thing, since
the free really has already happened), but I can't now find what I might
have been thinking of.
Thanks,
Roland