[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1wrwzln8b.fsf@fess.ebiederm.org>
Date: Thu, 25 Mar 2010 21:29:24 -0700
From: ebiederm@...ssion.com (Eric W. Biederman)
To: NeilBrown <neilb@...e.de>
Cc: Greg Kroah-Hartman <gregkh@...e.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] sysfs: make s_count a kref
NeilBrown <neilb@...e.de> writes:
> s_count in sysfs behaves exactly like a kref, so change it to
> be one.
> This requires adding a KREF_INIT macro to kref.h
Except where it doesn't. The whole no_recurse thing is definitely
not idiomatic kref usage. I could find only 3 instances of someone even
looking at the return value. I would argue based on that the return
value of kref_put should be removed.
KREF_INIT if we want it should be added in a separate patch.
kref should be kept for the stupid simple cases where so we don't have
to think about refcounting, and just know it works. kref should not
be where we are getting clever, and it this feels like getting clever
to me.
It isn't like the atomic primitives are any worse than kref.
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists