ocfs2: rollback alloc_dinode counts when ocfs2_block_group_set_bits() failed
authorYounger Liu <younger.liucn@gmail.com>
Thu, 3 Apr 2014 21:47:10 +0000 (14:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:20:56 +0000 (16:20 -0700)
commitdb66c71577d525c0cd65e66ff675747565783ba4
tree94744927610c329533bad994055a37d2e2a3b5d1
parente228f6439862359f9b26f9d62634e4fce180b54a
ocfs2: rollback alloc_dinode counts when ocfs2_block_group_set_bits() failed

After updating alloc_dinode counts in ocfs2_alloc_dinode_update_counts(),
if ocfs2_alloc_dinode_update_bitmap() failed, there is a rare case that
some space may be lost.

So, roll back alloc_dinode counts when ocfs2_block_group_set_bits()
failed.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Younger Liu <younger.liucn@gmail.com>
Reviewed-by: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/move_extents.c
fs/ocfs2/suballoc.c
fs/ocfs2/suballoc.h