]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/linux/jbd2.h
mm/memory_hotplug: export generic_online_page()
[linux.git] / include / linux / jbd2.h
index 587c146d398780e88ba00c048afa2680d2b12ccb..29dce6ff6bae88fd8c367a47b0fca1eb0f790481 100644 (file)
@@ -1169,7 +1169,7 @@ struct journal_s
 #define jbd2_might_wait_for_commit(j) \
        do { \
                rwsem_acquire(&j->j_trans_commit_map, 0, 0, _THIS_IP_); \
-               rwsem_release(&j->j_trans_commit_map, 1, _THIS_IP_); \
+               rwsem_release(&j->j_trans_commit_map, _THIS_IP_); \
        } while (0)
 
 /* journal feature predicate functions */
@@ -1627,10 +1627,14 @@ static inline tid_t  jbd2_get_latest_transaction(journal_t *journal)
        return tid;
 }
 
-
 static inline int jbd2_handle_buffer_credits(handle_t *handle)
 {
-       journal_t *journal = handle->h_transaction->t_journal;
+       journal_t *journal;
+
+       if (!handle->h_reserved)
+               journal = handle->h_transaction->t_journal;
+       else
+               journal = handle->h_journal;
 
        return handle->h_total_credits -
                DIV_ROUND_UP(handle->h_revoke_credits_requested,