summaryrefslogtreecommitdiff
path: root/include/linux/jbd.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-06-17 18:30:59 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-06-17 18:30:59 -0700
commit833f3d158b8f7592cf230759b1a412985b146ae5 (patch)
treedf59b87e354008bf987e4f3823196440e4357c31 /include/linux/jbd.h
parenteba4b4b7ac85e7e37af12d6aa1031325dffc1bc5 (diff)
[PATCH] JBD: add some locking assertions
Drop in a few assertions to ensure that the locking rules are being adhered to.
Diffstat (limited to 'include/linux/jbd.h')
-rw-r--r--include/linux/jbd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/jbd.h b/include/linux/jbd.h
index 81a5767c9b04..e0501a317e31 100644
--- a/include/linux/jbd.h
+++ b/include/linux/jbd.h
@@ -322,6 +322,11 @@ static inline int jbd_trylock_bh_state(struct buffer_head *bh)
return bit_spin_trylock(BH_State, &bh->b_state);
}
+static inline int jbd_is_locked_bh_state(struct buffer_head *bh)
+{
+ return bit_spin_is_locked(BH_State, &bh->b_state);
+}
+
static inline void jbd_unlock_bh_state(struct buffer_head *bh)
{
bit_spin_unlock(BH_State, &bh->b_state);