ocfs2: fix a tiny race when truncate dio orohaned entry
authorJoseph Qi <joseph.qi@huawei.com>
Wed, 24 Jun 2015 23:54:59 +0000 (16:54 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 25 Jun 2015 00:49:39 +0000 (17:49 -0700)
commitcf1776a9e834400ed8e2fea48ffa6daa9da28446
treeb1612f8a870a1305cf32cc339119a68635091e6e
parente327284abb8aee3206cef3b790a283fea213a174
ocfs2: fix a tiny race when truncate dio orohaned entry

Once dio crashed it will leave an entry in orphan dir.  And orphan scan
will take care of the clean up.  There is a tiny race case that the same
entry will be truncated twice and then trigger the BUG in
ocfs2_del_inode_from_orphan.

Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/aops.c
fs/ocfs2/journal.c
fs/ocfs2/namei.c
fs/ocfs2/namei.h