nilfs2: fix potential hang in nilfs_error on errors=remount-ro
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Sun, 31 Jan 2010 10:46:40 +0000 (19:46 +0900)
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Sat, 13 Feb 2010 03:26:03 +0000 (12:26 +0900)
nilfs_error() calls nilfs_detach_segment_constructor() if
errors=remount-ro option is specified, and this may lead to a hang due
to recursive locking of, for instance, nilfs->ns_segctor_sem and
others.

In this case, detaching segment constructor is not necessary because
read-only flag is set to the filesystem and further writes are
blocked.

This fixes the potential hang issue by removing the
nilfs_detach_segment_constructor() call from nilfs_error.

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

Simple merge
Simple merge