• Jie Liu's avatar
    ocfs2: rework transaction rollback in ocfs2_relink_block_group() · 49309841
    Jie Liu authored
    In ocfs2_relink_block_group(), we roll back all those changes if notify
    intent to modify buffers for metadata update failed even if the relevant
    buffer has not yet been modified/got dirty at that point, that are not
    quite right because of:
    
     - None buffer has been modified/dirty if failed to call
       ocfs2_journal_access_gd() against the previous block group buffer
    
     - Only the previous block group buffer has got dirty if failed to call
       ocfs2_journal_access_gd() against the block group buffer
    
     - There is no need to roll back the change for file entry buffer at all
    
    Those problems will not cause anything wrong but unnecessary.  This
    patch fix them and kill the useless bg_ptr variable as well.
    Signed-off-by: default avatarJie Liu <jeff.liu@oracle.com>
    Cc: Younger Liu <younger.liu@huawei.com>
    Cc: Sunil Mushran <sunil.mushran@gmail.com>
    Cc: Mark Fasheh <mfasheh@suse.com>
    Cc: Joel Becker <jlbec@evilplan.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    49309841
suballoc.c 76.4 KB