summaryrefslogtreecommitdiff
path: root/include/linux/buffer_head.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-18 10:11:25 +0100
committerClark Williams <williams@redhat.com>2012-03-14 10:49:54 -0500
commitf0cd0e28f6a5d225fbeda0c3afdbd8d1523029b3 (patch)
tree469bfcb907a725d84da55f376f7940c8a744a9a5 /include/linux/buffer_head.h
parent102dcb3f6b02e1f5c72b8ee11b90db3ff407e3e8 (diff)
fs: jbd/jbd2: Make state lock and journal head lock rt safe
bit_spin_locks break under RT. Based on a previous patch from Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> -- include/linux/buffer_head.h | 10 ++++++++++ include/linux/jbd_common.h | 24 ++++++++++++++++++++++++ 2 files changed, 34 insertions(+)
Diffstat (limited to 'include/linux/buffer_head.h')
-rw-r--r--include/linux/buffer_head.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index 5c16cf1803a6..3f8e27b16ed5 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -74,6 +74,11 @@ struct buffer_head {
atomic_t b_count; /* users using this buffer_head */
#ifdef CONFIG_PREEMPT_RT_BASE
spinlock_t b_uptodate_lock;
+#if defined(CONFIG_JBD) || defined(CONFIG_JBD_MODULE) || \
+ defined(CONFIG_JBD2) || defined(CONFIG_JBD2_MODULE)
+ spinlock_t b_state_lock;
+ spinlock_t b_journal_head_lock;
+#endif
#endif
};
@@ -105,6 +110,11 @@ static inline void buffer_head_init_locks(struct buffer_head *bh)
{
#ifdef CONFIG_PREEMPT_RT_BASE
spin_lock_init(&bh->b_uptodate_lock);
+#if defined(CONFIG_JBD) || defined(CONFIG_JBD_MODULE) || \
+ defined(CONFIG_JBD2) || defined(CONFIG_JBD2_MODULE)
+ spin_lock_init(&bh->b_state_lock);
+ spin_lock_init(&bh->b_journal_head_lock);
+#endif
#endif
}