]> git.baikalelectronics.ru Git - kernel.git/commit
UBIFS: remove duplicated code
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 26 Apr 2011 06:49:32 +0000 (09:49 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 13 May 2011 16:23:55 +0000 (19:23 +0300)
commit123394a96640c436abc8eb1cb6c9764128b1ef04
tree04bad5852693a5a18cb919c298e59dbf385c1d96
parent27aa5fd99faa6a16d8fd92637e5e85de355b2ffa
UBIFS: remove duplicated code

We have duplicated code in 'ubifs_garbage_collect()' and
'ubifs_rcvry_gc_commit()', which is about handling the special case of free
LEB. In both cases we just want to garbage-collect the LEB using
'ubifs_garbage_collect_leb()'.

This patch teaches 'ubifs_garbage_collect_leb()' to handle free LEB's so that
the caller does not have to do this and the duplicated code is removed.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
fs/ubifs/gc.c
fs/ubifs/recovery.c