jbd2: jbd2_journal_init_{dev,inode} return proper error return value
[linux-2.6-microblaze.git] / fs / ocfs2 / journal.c
index 25d8072..1d2960e 100644 (file)
@@ -911,9 +911,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;
        }
 
@@ -1687,9 +1687,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;
        }