From: Jaegeuk Kim Date: Tue, 8 Oct 2013 01:19:28 +0000 (+0900) Subject: f2fs: fix writing incorrect orphan blocks X-Git-Tag: v3.13-rc1~113^2~31 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccaaca25919a2cdeccd8fdce5f546e3ed7f6a9e9;p=pandora-kernel.git f2fs: fix writing incorrect orphan blocks Previously, there was a erroneous scenario like below. thread 1: thread 2: f2fs_unlink - acquire_orphan_inode : sbi->n_orphans++ write_checkpoint - block_operations : f2fs_lock_all - do_checkpoint : write orphan blocks with sbi->n_orphans - unblock_operations - f2fs_lock_op - release_orphan_inode - f2fs_unlock_op During the checkpoint by thread 2, f2fs stores a wrong orphan block according to the wrong sbi->n_orphans. To avoid this, simply we should make cover acquire_orphan_inode too with f2fs_lock_op. Signed-off-by: Jaegeuk Kim --- Reading git-diff-tree failed