Hello, Nick. On 05/25/2010 05:51 PM, Nick Piggin wrote: > I don't like the subtle multi-context code in bd_claim (ie. detects where it > has been called based on bd_claiming). It seems clearer to just require a new > function to finish a 2-part claim. Oh yeah, that looks much better. What was I thinking? :-) > Also improve commentary in bd_start_claiming as to how it should > be used. > > Signed-off-by: Nick Piggin <npiggin@xxxxxxx> Acked-by: Tejun Heo <tj@xxxxxxxxxx> but one small nit. > +static void bd_finish_claiming(struct block_device *bdev, > + struct block_device *whole, void *holder) > +{ > + spin_lock(&bdev_lock); > + BUG_ON(whole->bd_claiming != holder); The above test is already done in __bd_abort_claiming(). > + BUG_ON(!bd_may_claim(bdev, whole, holder)); > + __bd_claim(bdev, whole, holder); > + __bd_abort_claiming(whole, holder); /* not actually an abort */ > +} Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html