nilfs2: fix possible recovery failure due to block creation without writer
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Tue, 28 Apr 2009 14:38:46 +0000 (23:38 +0900)
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Sat, 9 May 2009 04:36:56 +0000 (13:36 +0900)
commit85c2a74fabadfc561b75fbd7decc6bcbfe873d57
treead0adcd8377412184a9a5bac9fea3191cbea29ca
parent091bf7624d1c90cec9e578a18529f615213ff847
nilfs2: fix possible recovery failure due to block creation without writer

Some function calls in nilfs_prepare_segment_for_recovery() may fail
because they can create blocks on meta data files without configuring
a writable FS-instance.  Concretely, nilfs_mdt_create_block() routine
of meta data files will fail in that case.

This fixes the problem by temporarily attaching a writable FS-instace
during the function is called.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
fs/nilfs2/recovery.c