[lkml]   [2008]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 4/7] udf: replace loops coded with goto to real loops
On Mon 07-01-08 22:10:01, Marcin Slusarz wrote:
> On Mon, Jan 07, 2008 at 03:48:21PM +0100, Jan Kara wrote:
> > On Sun 06-01-08 02:21:50, wrote:
> > > Signed-off-by: Marcin Slusarz <>
> > I'm not sure if this improves readability in general. If the code is
> > really a loop in nature, then we should code it using do {} while but in
> > case we loop back just in case of some error (as seems to be the case in
> > udf_bitmap_new_block()), then IMHO goto is more explanative. So at least
> > that one case I'd leave as is.
> Why do you think it's an error?
There is code:

if (!udf_clear_bit(bit, bh->b_data)) {
udf_debug("bit already cleared for block %d\n", bit);
goto repeat;
Now if this happens, it's a bug AFAICS because we have been searching for
a free block and we hold s_alloc_mutex and hence we should not race with
any other allocation.

Jan Kara <>

 \ /
  Last update: 2008-01-08 11:21    [W:0.038 / U:9.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site