Skip to content
  • Jan Kara's avatar
    [PATCH] ext3: fix list scanning in __cleanup_transaction · 7e3b11a9
    Jan Kara authored
    
    
    Fix a bug in list scanning that can cause us to skip the last buffer on the
    checkpoint list (and hence fail to do any progress under some rather
    unfavorable conditions).
    
    The problem is we first do jh=next_jh and then test
    
    	} while (jh!=last_jh);
    
    Hence we skip the last buffer on the list (if it was not the only buffer on
    the list).  As we already do jh=next_jh; in the beginning of the loop we
    are safe to just remove the assignment in the end.  It can happen that 'jh'
    will be freed at the point we test jh != last_jh but that does not matter
    as we never *dereference* the pointer.
    
    Signed-off-by: default avatarJan Kara <jack@suse.cz>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    7e3b11a9