@@ -645,7 +645,7 @@ static void dm_exception_table_lock_init(struct dm_snapshot *s, chunk_t chunk,
static void dm_exception_table_lock(struct dm_exception_table_lock *lock)
{
hlist_bl_lock(lock->complete_slot);
- hlist_bl_lock(lock->pending_slot);
+ hlist_bl_lock_nested(lock->pending_slot, SINGLE_DEPTH_NESTING);
}
static void dm_exception_table_unlock(struct dm_exception_table_lock *lock)
@@ -83,6 +83,11 @@ static inline void hlist_bl_lock(struct hlist_bl_head *b)
spin_lock(&b->lock);
}
+static inline void hlist_bl_lock_nested(struct hlist_bl_head *b, int subclass)
+{
+ spin_lock_nested(&b->lock, subclass);
+}
+
static inline void hlist_bl_unlock(struct hlist_bl_head *b)
{
spin_unlock(&b->lock);
@@ -125,6 +130,11 @@ static inline void hlist_bl_lock(struct hlist_bl_head *b)
bit_spin_lock(0, (unsigned long *)b);
}
+static inline void hlist_bl_lock_nested(struct hlist_bl_head *b, int subclass)
+{
+ hlist_bl_lock(b);
+}
+
static inline void hlist_bl_unlock(struct hlist_bl_head *b)
{
__bit_spin_unlock(0, (unsigned long *)b);