On Mon, 27 Nov 2006, Oliver Neukum wrote:

> Am Montag, 27. November 2006 04:00 schrieb Alan Stern:
> > > > Fourth, you might consider deallocating the sysfs_buffer_collection as
> > > > soon as the last buffer is removed from its list.  I don't know if this
> > > > really matters...
> > > 
> > > That would mean having to use the inode's lock.
> > 
> > As mentioned above, you already use that lock when you create the
> > buffer_collection.  I don't see anything wrong with using the lock again
> > when you deallocate it.
> 
> Very well. Here it is.

I like it, except for one little detail.  You don't need buffer->anchor; 
it gets used only in remove_from_collection(), which is called only from 
sysfs_release(), so you can pass the inode directly as an argument.

Now let's see what Greg and any other sysfs people think...

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to