]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - fs/ocfs2/journal.c
Merge branch 'akpm' (patches from Andrew)
[mirror_ubuntu-jammy-kernel.git] / fs / ocfs2 / journal.c
index b63c97f4318e063889fe1ca203d19092c1abbedf..46fd3ef2cf212e4ae45ad0bf6f248b89612b9d6d 100644 (file)
@@ -1017,7 +1017,8 @@ void ocfs2_journal_shutdown(struct ocfs2_super *osb)
                        mlog_errno(status);
        }
 
-       if (status == 0) {
+       /* Shutdown the kernel journal system */
+       if (!jbd2_journal_destroy(journal->j_journal) && !status) {
                /*
                 * Do not toggle if flush was unsuccessful otherwise
                 * will leave dirty metadata in a "clean" journal
@@ -1026,9 +1027,6 @@ void ocfs2_journal_shutdown(struct ocfs2_super *osb)
                if (status < 0)
                        mlog_errno(status);
        }
-
-       /* Shutdown the kernel journal system */
-       jbd2_journal_destroy(journal->j_journal);
        journal->j_journal = NULL;
 
        OCFS2_I(inode)->ip_open_count--;