* [PATCH] ocfs2:Use BUG_ON instead of if condition followed by BUG.
@ 2021-11-05 1:44 ` cgel.zte
0 siblings, 0 replies; 4+ messages in thread
From: cgel.zte @ 2021-11-05 1:44 UTC (permalink / raw)
To: mark
Cc: jlbec, joseph.qi, ocfs2-devel, linux-kernel, Zhang Mingyu, Zeal Robot
From: Zhang Mingyu <zhang.mingyu@zte.com.cn>
This issue was detected with the help of Coccinelle.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Zhang Mingyu <zhang.mingyu@zte.com.cn>
---
fs/ocfs2/journal.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index dbf9b9e97d74..1887a2708709 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -1669,8 +1669,7 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb,
status = jbd2_journal_load(journal);
if (status < 0) {
mlog_errno(status);
- if (!igrab(inode))
- BUG();
+ BUG_ON(!igrab(inode));
jbd2_journal_destroy(journal);
goto done;
}
@@ -1699,8 +1698,7 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb,
if (status < 0)
mlog_errno(status);
- if (!igrab(inode))
- BUG();
+ BUG_ON(!igrab(inode));
jbd2_journal_destroy(journal);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2:Use BUG_ON instead of if condition followed by BUG.
@ 2021-11-05 1:44 ` cgel.zte
0 siblings, 0 replies; 4+ messages in thread
From: cgel.zte @ 2021-11-05 1:44 UTC (permalink / raw)
To: mark; +Cc: Zeal Robot, linux-kernel, Zhang Mingyu, ocfs2-devel
From: Zhang Mingyu <zhang.mingyu@zte.com.cn>
This issue was detected with the help of Coccinelle.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Zhang Mingyu <zhang.mingyu@zte.com.cn>
---
fs/ocfs2/journal.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index dbf9b9e97d74..1887a2708709 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -1669,8 +1669,7 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb,
status = jbd2_journal_load(journal);
if (status < 0) {
mlog_errno(status);
- if (!igrab(inode))
- BUG();
+ BUG_ON(!igrab(inode));
jbd2_journal_destroy(journal);
goto done;
}
@@ -1699,8 +1698,7 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb,
if (status < 0)
mlog_errno(status);
- if (!igrab(inode))
- BUG();
+ BUG_ON(!igrab(inode));
jbd2_journal_destroy(journal);
--
2.25.1
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ocfs2:Use BUG_ON instead of if condition followed by BUG.
2021-11-05 1:44 ` [Ocfs2-devel] " cgel.zte
@ 2021-11-05 1:54 ` Joseph Qi
-1 siblings, 0 replies; 4+ messages in thread
From: Joseph Qi @ 2021-11-05 1:54 UTC (permalink / raw)
To: cgel.zte, mark, akpm
Cc: jlbec, ocfs2-devel, linux-kernel, Zhang Mingyu, Zeal Robot
On 11/5/21 9:44 AM, cgel.zte@gmail.com wrote:
> From: Zhang Mingyu <zhang.mingyu@zte.com.cn>
>
> This issue was detected with the help of Coccinelle.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Zhang Mingyu <zhang.mingyu@zte.com.cn>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/journal.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
> index dbf9b9e97d74..1887a2708709 100644
> --- a/fs/ocfs2/journal.c
> +++ b/fs/ocfs2/journal.c
> @@ -1669,8 +1669,7 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb,
> status = jbd2_journal_load(journal);
> if (status < 0) {
> mlog_errno(status);
> - if (!igrab(inode))
> - BUG();
> + BUG_ON(!igrab(inode));
> jbd2_journal_destroy(journal);
> goto done;
> }
> @@ -1699,8 +1698,7 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb,
> if (status < 0)
> mlog_errno(status);
>
> - if (!igrab(inode))
> - BUG();
> + BUG_ON(!igrab(inode));
>
> jbd2_journal_destroy(journal);
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Ocfs2-devel] [PATCH] ocfs2:Use BUG_ON instead of if condition followed by BUG.
@ 2021-11-05 1:54 ` Joseph Qi
0 siblings, 0 replies; 4+ messages in thread
From: Joseph Qi @ 2021-11-05 1:54 UTC (permalink / raw)
To: cgel.zte, mark, akpm; +Cc: Zeal Robot, Zhang Mingyu, ocfs2-devel, linux-kernel
On 11/5/21 9:44 AM, cgel.zte@gmail.com wrote:
> From: Zhang Mingyu <zhang.mingyu@zte.com.cn>
>
> This issue was detected with the help of Coccinelle.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Zhang Mingyu <zhang.mingyu@zte.com.cn>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/journal.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
> index dbf9b9e97d74..1887a2708709 100644
> --- a/fs/ocfs2/journal.c
> +++ b/fs/ocfs2/journal.c
> @@ -1669,8 +1669,7 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb,
> status = jbd2_journal_load(journal);
> if (status < 0) {
> mlog_errno(status);
> - if (!igrab(inode))
> - BUG();
> + BUG_ON(!igrab(inode));
> jbd2_journal_destroy(journal);
> goto done;
> }
> @@ -1699,8 +1698,7 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb,
> if (status < 0)
> mlog_errno(status);
>
> - if (!igrab(inode))
> - BUG();
> + BUG_ON(!igrab(inode));
>
> jbd2_journal_destroy(journal);
>
>
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-05 1:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-05 1:44 [PATCH] ocfs2:Use BUG_ON instead of if condition followed by BUG cgel.zte
2021-11-05 1:44 ` [Ocfs2-devel] " cgel.zte
2021-11-05 1:54 ` Joseph Qi
2021-11-05 1:54 ` [Ocfs2-devel] " 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.