Merge tag 'block-6.6-2023-09-08' of git://git.kernel.dk/linux
[platform/kernel/linux-rpi.git] / fs / ocfs2 / journal.c
index e8e7d47..ce21556 100644 (file)
@@ -908,9 +908,9 @@ int ocfs2_journal_init(struct ocfs2_super *osb, int *dirty)
 
        /* call the kernels journal init function now */
        j_journal = jbd2_journal_init_inode(inode);
-       if (j_journal == NULL) {
+       if (IS_ERR(j_journal)) {
                mlog(ML_ERROR, "Linux journal layer error\n");
-               status = -EINVAL;
+               status = PTR_ERR(j_journal);
                goto done;
        }
 
@@ -1684,9 +1684,9 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb,
        }
 
        journal = jbd2_journal_init_inode(inode);
-       if (journal == NULL) {
+       if (IS_ERR(journal)) {
                mlog(ML_ERROR, "Linux journal layer error\n");
-               status = -EIO;
+               status = PTR_ERR(journal);
                goto done;
        }