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

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.