btrfs: add comments to barriers before waitqueue_active
[deliverable/linux.git] / fs / btrfs / transaction.c
index e8e5b5a107190a5aa82a4b9d187fbfde3f36f3f7..3fd70f797b7d7c7edd9ab5d3598289310b780bb0 100644 (file)
@@ -861,6 +861,9 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans,
        atomic_dec(&cur_trans->num_writers);
        extwriter_counter_dec(cur_trans, trans->type);
 
+       /*
+        * Make sure counter is updated before we wake up waiters.
+        */
        smp_mb();
        if (waitqueue_active(&cur_trans->writer_wait))
                wake_up(&cur_trans->writer_wait);
This page took 0.026435 seconds and 5 git commands to generate.