nilfs2: missing a read lock for segment writer in nilfs_attach_checkpoint()
authorZhang Qiang <zhangqiang.buaa@gmail.com>
Tue, 18 Aug 2009 06:58:24 +0000 (14:58 +0800)
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Tue, 18 Aug 2009 08:32:27 +0000 (17:32 +0900)
commit1154ecbd2f8298ef75609f5f8ed5aca96be599fb
treea6801fc442fecf4c0b2a1dc1d7a5350910983041
parent64f1607ffbbc772685733ea63e6f7f4183df1b16
nilfs2: missing a read lock for segment writer in nilfs_attach_checkpoint()

'ns_cno' of structure 'the_nilfs' must be protected from segment
writer, in other words, the caller of nilfs_get_checkpoint should hold
read lock for nilfs->ns_segctor_sem.  This patch adds the lock/unlock
operations in nilfs_attach_checkpoint() when calling
nilfs_cpfile_get_checkpoint().

Signed-off-by: Zhang Qiang <zhangqiang.buaa@gmail.com>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
fs/nilfs2/super.c