All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] jbd2,ocfs2: fix wrong pointer pass to PTR_ERR()
@ 2023-08-22  3:00 Yang Yingliang
  2023-08-22  3:44 ` Joseph Qi
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Yang Yingliang @ 2023-08-22  3:00 UTC (permalink / raw)
  To: ocfs2-devel; +Cc: mark, jlbec, joseph.qi, tytso, yi.zhang, jack, yangyingliang

Fix wrong pointer pass to PTR_ERR() if jbd2_journal_init_inode() fails.

Fixes: c279913275eb ("jbd2: jbd2_journal_init_{dev,inode} return proper error return value")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 fs/ocfs2/journal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index 90af6c47161d..ce215565d061 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -910,7 +910,7 @@ int ocfs2_journal_init(struct ocfs2_super *osb, int *dirty)
 	j_journal = jbd2_journal_init_inode(inode);
 	if (IS_ERR(j_journal)) {
 		mlog(ML_ERROR, "Linux journal layer error\n");
-		status = PTR_ERR(journal);
+		status = PTR_ERR(j_journal);
 		goto done;
 	}
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] jbd2,ocfs2: fix wrong pointer pass to PTR_ERR()
  2023-08-22  3:00 [PATCH -next] jbd2,ocfs2: fix wrong pointer pass to PTR_ERR() Yang Yingliang
@ 2023-08-22  3:44 ` Joseph Qi
  2023-08-22  6:07 ` Zhang Yi
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Joseph Qi @ 2023-08-22  3:44 UTC (permalink / raw)
  To: Yang Yingliang, ocfs2-devel, akpm
  Cc: mark, jlbec, joseph.qi, tytso, yi.zhang, jack



On 8/22/23 11:00 AM, Yang Yingliang wrote:
> Fix wrong pointer pass to PTR_ERR() if jbd2_journal_init_inode() fails.
> 
> Fixes: c279913275eb ("jbd2: jbd2_journal_init_{dev,inode} return proper error return value")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
>  fs/ocfs2/journal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
> index 90af6c47161d..ce215565d061 100644
> --- a/fs/ocfs2/journal.c
> +++ b/fs/ocfs2/journal.c
> @@ -910,7 +910,7 @@ int ocfs2_journal_init(struct ocfs2_super *osb, int *dirty)
>  	j_journal = jbd2_journal_init_inode(inode);
>  	if (IS_ERR(j_journal)) {
>  		mlog(ML_ERROR, "Linux journal layer error\n");
> -		status = PTR_ERR(journal);
> +		status = PTR_ERR(j_journal);
>  		goto done;
>  	}
>  

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] jbd2,ocfs2: fix wrong pointer pass to PTR_ERR()
  2023-08-22  3:00 [PATCH -next] jbd2,ocfs2: fix wrong pointer pass to PTR_ERR() Yang Yingliang
  2023-08-22  3:44 ` Joseph Qi
@ 2023-08-22  6:07 ` Zhang Yi
  2023-08-22  9:57 ` Jan Kara
  2023-08-23  4:01 ` Theodore Ts'o
  3 siblings, 0 replies; 5+ messages in thread
From: Zhang Yi @ 2023-08-22  6:07 UTC (permalink / raw)
  To: Yang Yingliang, ocfs2-devel; +Cc: mark, jlbec, joseph.qi, tytso, jack

On 2023/8/22 11:00, Yang Yingliang wrote:
> Fix wrong pointer pass to PTR_ERR() if jbd2_journal_init_inode() fails.
> 
> Fixes: c279913275eb ("jbd2: jbd2_journal_init_{dev,inode} return proper error return value")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

Ah, my mistake, thanks for the fix.

Reviewed-by: Zhang Yi <yi.zhang@huawei.com>

> ---
>  fs/ocfs2/journal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
> index 90af6c47161d..ce215565d061 100644
> --- a/fs/ocfs2/journal.c
> +++ b/fs/ocfs2/journal.c
> @@ -910,7 +910,7 @@ int ocfs2_journal_init(struct ocfs2_super *osb, int *dirty)
>  	j_journal = jbd2_journal_init_inode(inode);
>  	if (IS_ERR(j_journal)) {
>  		mlog(ML_ERROR, "Linux journal layer error\n");
> -		status = PTR_ERR(journal);
> +		status = PTR_ERR(j_journal);
>  		goto done;
>  	}
>  
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] jbd2,ocfs2: fix wrong pointer pass to PTR_ERR()
  2023-08-22  3:00 [PATCH -next] jbd2,ocfs2: fix wrong pointer pass to PTR_ERR() Yang Yingliang
  2023-08-22  3:44 ` Joseph Qi
  2023-08-22  6:07 ` Zhang Yi
@ 2023-08-22  9:57 ` Jan Kara
  2023-08-23  4:01 ` Theodore Ts'o
  3 siblings, 0 replies; 5+ messages in thread
From: Jan Kara @ 2023-08-22  9:57 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: ocfs2-devel, mark, jlbec, joseph.qi, tytso, yi.zhang, jack

On Tue 22-08-23 11:00:18, Yang Yingliang wrote:
> Fix wrong pointer pass to PTR_ERR() if jbd2_journal_init_inode() fails.
> 
> Fixes: c279913275eb ("jbd2: jbd2_journal_init_{dev,inode} return proper error return value")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

Oh right, I've missed this during my review. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/ocfs2/journal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
> index 90af6c47161d..ce215565d061 100644
> --- a/fs/ocfs2/journal.c
> +++ b/fs/ocfs2/journal.c
> @@ -910,7 +910,7 @@ int ocfs2_journal_init(struct ocfs2_super *osb, int *dirty)
>  	j_journal = jbd2_journal_init_inode(inode);
>  	if (IS_ERR(j_journal)) {
>  		mlog(ML_ERROR, "Linux journal layer error\n");
> -		status = PTR_ERR(journal);
> +		status = PTR_ERR(j_journal);
>  		goto done;
>  	}
>  
> -- 
> 2.25.1
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] jbd2,ocfs2: fix wrong pointer pass to PTR_ERR()
  2023-08-22  3:00 [PATCH -next] jbd2,ocfs2: fix wrong pointer pass to PTR_ERR() Yang Yingliang
                   ` (2 preceding siblings ...)
  2023-08-22  9:57 ` Jan Kara
@ 2023-08-23  4:01 ` Theodore Ts'o
  3 siblings, 0 replies; 5+ messages in thread
From: Theodore Ts'o @ 2023-08-23  4:01 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: ocfs2-devel, mark, jlbec, joseph.qi, yi.zhang, jack

Thanks for pointing this out; I've folded your fix into buggy commit
("jbd2: jbd2_journal_init_{dev,inode} return proper error return
value").

						- Ted

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-23  4:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-22  3:00 [PATCH -next] jbd2,ocfs2: fix wrong pointer pass to PTR_ERR() Yang Yingliang
2023-08-22  3:44 ` Joseph Qi
2023-08-22  6:07 ` Zhang Yi
2023-08-22  9:57 ` Jan Kara
2023-08-23  4:01 ` Theodore Ts'o

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.