LCOV - code coverage report
Current view: top level - include/linux - jbd_common.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 3 4 75.0 %
Date: 2014-02-18 Functions: 0 0 -
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : #ifndef _LINUX_JBD_STATE_H
       2                 :            : #define _LINUX_JBD_STATE_H
       3                 :            : 
       4                 :            : #include <linux/bit_spinlock.h>
       5                 :            : 
       6                 :            : static inline struct buffer_head *jh2bh(struct journal_head *jh)
       7                 :            : {
       8                 :            :         return jh->b_bh;
       9                 :            : }
      10                 :            : 
      11                 :            : static inline struct journal_head *bh2jh(struct buffer_head *bh)
      12                 :            : {
      13                 :            :         return bh->b_private;
      14                 :            : }
      15                 :            : 
      16                 :            : static inline void jbd_lock_bh_state(struct buffer_head *bh)
      17                 :            : {
      18                 :   16316673 :         bit_spin_lock(BH_State, &bh->b_state);
      19                 :            : }
      20                 :            : 
      21                 :            : static inline int jbd_trylock_bh_state(struct buffer_head *bh)
      22                 :            : {
      23                 :          0 :         return bit_spin_trylock(BH_State, &bh->b_state);
      24                 :            : }
      25                 :            : 
      26                 :            : static inline int jbd_is_locked_bh_state(struct buffer_head *bh)
      27                 :            : {
      28                 :            :         return bit_spin_is_locked(BH_State, &bh->b_state);
      29                 :            : }
      30                 :            : 
      31                 :            : static inline void jbd_unlock_bh_state(struct buffer_head *bh)
      32                 :            : {
      33                 :      70418 :         bit_spin_unlock(BH_State, &bh->b_state);
      34                 :            : }
      35                 :            : 
      36                 :            : static inline void jbd_lock_bh_journal_head(struct buffer_head *bh)
      37                 :            : {
      38                 :   66441654 :         bit_spin_lock(BH_JournalHead, &bh->b_state);
      39                 :            : }
      40                 :            : 
      41                 :            : static inline void jbd_unlock_bh_journal_head(struct buffer_head *bh)
      42                 :            : {
      43                 :            :         bit_spin_unlock(BH_JournalHead, &bh->b_state);
      44                 :            : }
      45                 :            : 
      46                 :            : #endif

Generated by: LCOV version 1.9