Re: [PATCH] kref: remove kref_set

From: Greg KH
Date: Tue Mar 16 2010 - 13:57:14 EST


On Tue, Mar 16, 2010 at 03:14:51PM +1100, NeilBrown wrote:
>
>
> Of the three uses of kref_set in the kernel:
>
> One really should be kref_put as the code is letting go of a
> reference,
> Two really should be kref_init because the kref is being
> initialised.
>
> This suggests that making kref_set available encourages bad code.
> So fix the three uses and remove kref_set completely.

Yeah!

I really didn't like kref_set at all anyway, and I thought that someone
"required it" which is why it was added. Oh well, I'm glad it is now
gone, thanks so much for this patch.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/