]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ocfs2: rework transaction rollback in ocfs2_relink_block_group()
authorJie Liu <jeff.liu@oracle.com>
Thu, 27 Jun 2013 23:51:07 +0000 (09:51 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:37:18 +0000 (16:37 +1000)
commit43e07f6b721869c2de15ae2b8df31f18d421a28f
tree7bee5f465aaeed4d0ab328208eaa4d0090705002
parentf45d9d44896d3cdb62b9198be6b2870b39aa6c5e
ocfs2: rework transaction rollback in ocfs2_relink_block_group()

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: Jie 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: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/suballoc.c