ext4: do not call FC trace event in ext4_fc_commit() if FS does not support FC
[linux-2.6-block.git] / fs / ext4 / fast_commit.c
index 5ac594e0340244ff3bd907779b943ad439fcaca6..55d33f296caeddc00a4b41d9d5fdd6c1034c0f52 100644 (file)
@@ -1165,13 +1165,13 @@ int ext4_fc_commit(journal_t *journal, tid_t commit_tid)
        int status = EXT4_FC_STATUS_OK, fc_bufs_before = 0;
        ktime_t start_time, commit_time;
 
+       if (!test_opt2(sb, JOURNAL_FAST_COMMIT))
+               return jbd2_complete_transaction(journal, commit_tid);
+
        trace_ext4_fc_commit_start(sb);
 
        start_time = ktime_get();
 
-       if (!test_opt2(sb, JOURNAL_FAST_COMMIT))
-               return jbd2_complete_transaction(journal, commit_tid);
-
 restart_fc:
        ret = jbd2_fc_begin_commit(journal, commit_tid);
        if (ret == -EALREADY) {