Re: Sysfs attributes racing with unregistration

From: Tejun Heo
Date: Wed Jan 04 2012 - 13:20:46 EST


Hello,

On Wed, Jan 04, 2012 at 01:13:41PM -0500, Alan Stern wrote:
> Now, looking through the code, I wonder why sysfs_{get,put}_active()
> and sysfs_deactivate() don't use a real rwsem. Why go to all the
> effort of imitating one? Is it just to save space?

Hmmm... maybe there was something which prevented that or maybe I was
just being stupid. I don't really remember. Space is a fairly
important consideration too. Depending on configuration, there can be
a LOT of sysfs_dirents and memory consumption from sysfs has been a
real problem.

Thanks.

--
tejun
--
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/