All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Yingliang <yangyingliang@huawei.com>
To: <ocfs2-devel@lists.linux.dev>
Cc: <mark@fasheh.com>, <jlbec@evilplan.org>,
	<joseph.qi@linux.alibaba.com>, <tytso@mit.edu>,
	<yi.zhang@huawei.com>, <jack@suse.cz>, <yangyingliang@huawei.com>
Subject: [PATCH -next] jbd2,ocfs2: fix wrong pointer pass to PTR_ERR()
Date: Tue, 22 Aug 2023 11:00:18 +0800	[thread overview]
Message-ID: <20230822030018.644419-1-yangyingliang@huawei.com> (raw)

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


             reply	other threads:[~2023-08-22  3:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-22  3:00 Yang Yingliang [this message]
2023-08-22  3:44 ` [PATCH -next] jbd2,ocfs2: fix wrong pointer pass to PTR_ERR() Joseph Qi
2023-08-22  6:07 ` Zhang Yi
2023-08-22  9:57 ` Jan Kara
2023-08-23  4:01 ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230822030018.644419-1-yangyingliang@huawei.com \
    --to=yangyingliang@huawei.com \
    --cc=jack@suse.cz \
    --cc=jlbec@evilplan.org \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=mark@fasheh.com \
    --cc=ocfs2-devel@lists.linux.dev \
    --cc=tytso@mit.edu \
    --cc=yi.zhang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.