lkml.org 
[lkml]   [2010]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kref: remove kref_set
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


\
 
 \ /
  Last update: 2010-03-16 18:59    [W:0.042 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site