Skip to content
Commit 7869e590 authored by Xiaowei.Hu's avatar Xiaowei.Hu Committed by Linus Torvalds
Browse files

ocfs2: ocfs2_prep_new_orphaned_file() should return ret



If an error occurs, for example an EIO in __ocfs2_prepare_orphan_dir,
ocfs2_prep_new_orphaned_file will release the inode_ac, then when the
caller of ocfs2_prep_new_orphaned_file gets a 0 return, it will refer to
a NULL ocfs2_alloc_context struct in the following functions.  A kernel
panic happens.

Signed-off-by: default avatar"Xiaowei.Hu" <xiaowei.hu@oracle.com>
Reviewed-by: default avatarshencanquan <shencanquan@huawei.com>
Acked-by: default avatarSunil Mushran <sunil.mushran@gmail.com>
Cc: Joe Jin <joe.jin@oracle.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5402b804
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment