]> git.karo-electronics.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>
Tue, 5 Nov 2013 05:55:11 +0000 (16:55 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:55:11 +0000 (16:55 +1100)
commit95f0e3be78abb22421a843a9b5ae400a2ec98f53
tree3b915bea3984595b2040fe03ec6262611c1cd6b0
parent73274ea9878b2942db414697f88b1cf4314560c9
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