ocfs2: remove goto statement in ocfs2_check_dir_for_entry()
PATCH 1/1 ocfs2: remove goto statement in ocfs2_check_dir_for_entry()
Signed-off-by Daeseok Youn <[email protected]>
--- fs/ocfs2/dir.c | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-)
fs/ocfs2/dir.c +5 -8
@@ -2043,22 +2043,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); - ret = -EEXIST ; -if (ocfs2_find_entry (name, namelen, dir, &lookup) ==0 ) - goto bail; +if (ocfs2_find_entry (name, namelen, dir, &lookup) ==0 ) { + ret = -EEXIST ; +mlog_errno (ret); + } - ret =0 ; -bail:ocfs2_free_dir_lookup_result (&lookup); -if (ret) -mlog_errno (ret);return ret; }
Signature · 1 line
1.7.1