OSDN Git Service

f2fs: update multi-dev metadata in resize_fs
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / fs / ocfs2 / journal.c
index 722eb5b..2301011 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--;