Message ID | 20230822030018.644419-1-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [-next] jbd2,ocfs2: fix wrong pointer pass to PTR_ERR() | expand |
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; > } >
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; > } > >
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 >
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
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; }
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(-)