Jaegeuk Kim ccaaca2591 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 <jaegeuk.kim@samsung.com>
2013-10-08 10:19:28 +09:00
..
2013-06-11 16:01:03 +09:00
2012-12-11 13:43:42 +09:00
2013-07-30 15:17:03 +09:00
2013-09-05 13:50:32 +09:00
2013-06-11 16:01:03 +09:00
2012-12-11 13:43:42 +09:00
2013-08-09 14:57:56 +09:00
2013-10-08 09:32:43 +09:00
2013-08-26 20:15:23 +09:00