ocfs2: ocfs2_initialize_super does cleanup job before return error
authorHeming Zhao via Ocfs2-devel <ocfs2-devel@oss.oracle.com>
Fri, 29 Apr 2022 21:37:58 +0000 (14:37 -0700)
committerakpm <akpm@linux-foundation.org>
Fri, 29 Apr 2022 21:37:58 +0000 (14:37 -0700)
commita8a986db64930b7d4cd4e4f68d8718bfa75c9528
tree5e79477b903d25416c3d86b326b31fdcfeab7768
parent54bd3f7c5c3b6b6101673ec9c73457127c317bf9
ocfs2: ocfs2_initialize_super does cleanup job before return error

After this patch, when error, ocfs2_fill_super doesn't take care to
release resources which are allocated in ocfs2_initialize_super.

Link: https://lkml.kernel.org/r/20220424130952.2436-4-heming.zhao@suse.com
Signed-off-by: Heming Zhao <heming.zhao@suse.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Jun Piao <piaojun@huawei.com>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Mark Fasheh <mark@fasheh.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/super.c