Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c01ad8f authored by Daeseok Youn's avatar Daeseok Youn Committed by Linus Torvalds
Browse files

ocfs2: remove goto statement in ocfs2_check_dir_for_entry()



Signed-off-by: default avatarDaeseok Youn <daeseok.youn@gmail.com>
Reviewed-by: default avatarJoseph Qi <joseph.qi@huawei.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 a47726bc
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -2047,22 +2047,19 @@ int ocfs2_check_dir_for_entry(struct inode *dir,
			      const char *name,
			      int namelen)
{
	int ret;
	int ret = 0;
	struct ocfs2_dir_lookup_result lookup = { NULL, };

	trace_ocfs2_check_dir_for_entry(
		(unsigned long long)OCFS2_I(dir)->ip_blkno, namelen, name);

	if (ocfs2_find_entry(name, namelen, dir, &lookup) == 0) {
		ret = -EEXIST;
	if (ocfs2_find_entry(name, namelen, dir, &lookup) == 0)
		goto bail;
		mlog_errno(ret);
	}

	ret = 0;
bail:
	ocfs2_free_dir_lookup_result(&lookup);

	if (ret)
		mlog_errno(ret);
	return ret;
}