]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ocfs2: should call ocfs2_journal_access_di() before ocfs2_delete_entry() in ocfs2_orp...
authorYounger Liu <younger.liu@huawei.com>
Wed, 3 Jul 2013 00:18:34 +0000 (10:18 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 17 Jul 2013 02:34:47 +0000 (12:34 +1000)
commit9811b87a103e914e4845e9dcaa3f7060101d77d1
tree8c1e7d6d8aa6f7e1747d03b62d5cdcc9db833806
parent92ab7d700452e3774a5215e49e10adc60a705e13
ocfs2: should call ocfs2_journal_access_di() before ocfs2_delete_entry() in ocfs2_orphan_del()

While deleting a file into orphan dir in ocfs2_orphan_del(), it calls
ocfs2_delete_entry() before ocfs2_journal_access_di().  If
ocfs2_delete_entry() succeeded and ocfs2_journal_access_di() failed, there
would be a inconsistency: the file is deleted from orphan dir, but orphan
dir dinode is not updated.

So we need to call ocfs2_journal_access_di() before ocfs2_orphan_del().

Signed-off-by: Younger Liu <younger.liu@huawei.com>
Reviewed-by: Jensen <shencanquan@huawei.com>
Cc: Jie Liu <jeff.liu@oracle.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/namei.c