UBIFS: switch to RO mode after synchronizing
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Wed, 4 Aug 2010 07:14:47 +0000 (10:14 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 30 Aug 2010 07:19:06 +0000 (10:19 +0300)
commit5ffef88ffeb730e1bf2da56a39a55e03d57a66c9
treea524f5806930d593d1f38f29f6a3e28948f8e851
parent2bfc96a127bc1cc94d26bfaa40159966064f9c8c
UBIFS: switch to RO mode after synchronizing

In 'ubifs_garbage_collect()' on error path, we first switch to R/O mode, and
then synchronize write-buffers (to make sure no data are lost). But the GC
write-buffer synchronization will fail, because we are already in R/O mode.
This patch re-orders this and makes sure we first synchronize the write-buffer,
and then switch to R/O mode.

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