From: Jaegeuk Kim Date: Tue, 30 Jul 2013 02:36:53 +0000 (+0900) Subject: f2fs: fix handling orphan inodes X-Git-Tag: v3.12-rc1~127^2~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbd56e7d20d7188d62a85aa6986a7b2c8e755ab5;p=pandora-kernel.git f2fs: fix handling orphan inodes This patch fixes mishandling of the sbi->n_orphans variable. If users request lots of f2fs_unlink(), check_orphan_space() could be contended. In such the case, sbi->n_orphans can be read incorrectly so that f2fs_unlink() would fall into the wrong state which results in the failure of add_orphan_inode(). So, let's increment sbi->n_orphans virtually prior to the actual orphan inode stuffs. After that, let's release sbi->n_orphans by calling release_orphan_inode or remove_orphan_inode. Signed-off-by: Jaegeuk Kim --- Reading git-diff-tree failed