• T
    jbd2: fold __process_buffer() into jbd2_log_do_checkpoint() · be1158cc
    Theodore Ts'o 提交于
    __process_buffer() is only called by jbd2_log_do_checkpoint(), and it
    had a very complex locking protocol where it would be called with the
    j_list_lock, and sometimes exit with the lock held (if the return code
    was 0), or release the lock.
    
    This was confusing both to humans and to smatch (which erronously
    complained that the lock was taken twice).
    
    Folding __process_buffer() to the caller allows us to simplify the
    control flow, making the resulting function easier to read and reason
    about, and dropping the compiled size of fs/jbd2/checkpoint.c by 150
    bytes (over 4% of the text size).
    Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
    Reviewed-by: NJan Kara <jack@suse.cz>
    be1158cc
checkpoint.c 19.3 KB