1 #ifndef _LINUX_JBD_STATE_H
2 #define _LINUX_JBD_STATE_H
4 static inline struct buffer_head *jh2bh(struct journal_head *jh)
9 static inline struct journal_head *bh2jh(struct buffer_head *bh)
14 static inline void jbd_lock_bh_state(struct buffer_head *bh)
16 bit_spin_lock(BH_State, &bh->b_state);
19 static inline int jbd_trylock_bh_state(struct buffer_head *bh)
21 return bit_spin_trylock(BH_State, &bh->b_state);
24 static inline int jbd_is_locked_bh_state(struct buffer_head *bh)
26 return bit_spin_is_locked(BH_State, &bh->b_state);
29 static inline void jbd_unlock_bh_state(struct buffer_head *bh)
31 bit_spin_unlock(BH_State, &bh->b_state);
34 static inline void jbd_lock_bh_journal_head(struct buffer_head *bh)
36 bit_spin_lock(BH_JournalHead, &bh->b_state);
39 static inline void jbd_unlock_bh_journal_head(struct buffer_head *bh)
41 bit_spin_unlock(BH_JournalHead, &bh->b_state);