* [Ocfs2-devel] [PATCH 4/4 RESEND] ocfs2: remove goto statement in ocfs2_check_dir_for_entry()
@ 2015-02-27 23:53 ` Daeseok Youn
0 siblings, 0 replies; 4+ messages in thread
From: Daeseok Youn @ 2015-02-27 23:53 UTC (permalink / raw)
To: mfasheh, akpm; +Cc: jlbec, ocfs2-devel, linux-kernel
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
RESEND: this patch is rebased by 1/4.
fs/ocfs2/dir.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
index c63f2b6..b3ab2a6 100644
--- a/fs/ocfs2/dir.c
+++ b/fs/ocfs2/dir.c
@@ -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;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 4/4 RESEND] ocfs2: remove goto statement in ocfs2_check_dir_for_entry()
@ 2015-02-27 23:53 ` Daeseok Youn
0 siblings, 0 replies; 4+ messages in thread
From: Daeseok Youn @ 2015-02-27 23:53 UTC (permalink / raw)
To: mfasheh, akpm; +Cc: jlbec, ocfs2-devel, linux-kernel
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
RESEND: this patch is rebased by 1/4.
fs/ocfs2/dir.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
index c63f2b6..b3ab2a6 100644
--- a/fs/ocfs2/dir.c
+++ b/fs/ocfs2/dir.c
@@ -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;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [Ocfs2-devel] [PATCH 4/4 RESEND] ocfs2: remove goto statement in ocfs2_check_dir_for_entry()
2015-02-27 23:53 ` Daeseok Youn
@ 2015-03-19 11:17 ` Joseph Qi
-1 siblings, 0 replies; 4+ messages in thread
From: Joseph Qi @ 2015-03-19 11:17 UTC (permalink / raw)
To: Daeseok Youn; +Cc: mfasheh, akpm, ocfs2-devel, linux-kernel
On 2015/2/28 7:53, Daeseok Youn wrote:
> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
> ---
> RESEND: this patch is rebased by 1/4.
>
> fs/ocfs2/dir.c | 13 +++++--------
> 1 files changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
> index c63f2b6..b3ab2a6 100644
> --- a/fs/ocfs2/dir.c
> +++ b/fs/ocfs2/dir.c
> @@ -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;
> }
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Ocfs2-devel] [PATCH 4/4 RESEND] ocfs2: remove goto statement in ocfs2_check_dir_for_entry()
@ 2015-03-19 11:17 ` Joseph Qi
0 siblings, 0 replies; 4+ messages in thread
From: Joseph Qi @ 2015-03-19 11:17 UTC (permalink / raw)
To: Daeseok Youn; +Cc: mfasheh, akpm, ocfs2-devel, linux-kernel
On 2015/2/28 7:53, Daeseok Youn wrote:
> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
> ---
> RESEND: this patch is rebased by 1/4.
>
> fs/ocfs2/dir.c | 13 +++++--------
> 1 files changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
> index c63f2b6..b3ab2a6 100644
> --- a/fs/ocfs2/dir.c
> +++ b/fs/ocfs2/dir.c
> @@ -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;
> }
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-19 11:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-27 23:53 [Ocfs2-devel] [PATCH 4/4 RESEND] ocfs2: remove goto statement in ocfs2_check_dir_for_entry() Daeseok Youn
2015-02-27 23:53 ` Daeseok Youn
2015-03-19 11:17 ` [Ocfs2-devel] " Joseph Qi
2015-03-19 11:17 ` Joseph Qi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.