]> 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>
Mon, 16 Dec 2013 23:44:57 +0000 (10:44 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 16 Dec 2013 23:44:57 +0000 (10:44 +1100)
commita062390a37e71ed0580d8b7ffe6c32ad7fdc582c
treebe3029069febe8a7da65c53b6b1980b05daff27f
parent441b635aa3a12ff7effe3ed7bccde5909be4ff27
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