lkml.org 
[lkml]   [2008]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] block: fix block_class iteration locking
Cornelia Huck wrote:
> Greg has some patches sitting in his tree that convert those functions
> to use class_{for_each,find}_device() instead - and that looks like the
> clean solution, especially since the class implementation details will
> be moved into a private structure. One worry though...

Yeah, that sounds nice.

> With your patch, you protect against adding/removing devices to/from
> the class between _start and _stop. This wasn't done previously, and
> won't be done with Greg's patches (which leaves in the
> locking/unlocking of block_class_lock). Not sure if I'm missing
> something here...

That's mostly the point of this patch. It wasn't protected properly
before. It would be best if there's a safe iterator (maybe use klist?).

Thanks.

--
tejun


\
 
 \ /
  Last update: 2008-07-19 12:27    [W:0.183 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site