Skip to contentSkip to conversation

dm table: Remove BUG_ON(in_interrupt())

PATCH Applied Sebastian Andrzej Siewior 2 participants 2 messages Nov 13, 2020 – Nov 16, 2020 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm table: Remove BUG_ON(in_interrupt())

From: Thomas Gleixner <[email protected]>

The BUG_ON(in_interrupt()) in dm_table_event() is a historic leftover from a rework of the dm table code which changed the calling context.

Issuing a BUG for a wrong calling context is frowned upon and in_interrupt() is deprecated and only covering parts of the wrong contexts. The sanity check for the context is covered by CONFIG_DEBUG_ATOMIC_SLEEP and other debug facilities already.

---
 drivers/md/dm-table.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/md/dm-table.c +0 -6
index ce543b761be7b..2073ee8d18f4f 100644
@@ -1247,12 +1247,6 @@ void dm_table_event_callback(struct dm_table *t,
 
 void dm_table_event(struct dm_table *t)
 {
-	/*
-	 * You can no longer call dm_table_event() from interrupt
-	 * context, use a bottom half instead.
-	 */
-	BUG_ON(in_interrupt());
-
 	mutex_lock(&_event_lock);
 	if (t->event_fn)
 		t->event_fn(t->event_context);
Signature · 7 lines
2.29.2


--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
Applied
#1 lore raw
Quoted 10 lines · Sebastian Andrzej Siewior

From: Thomas Gleixner <[email protected]>

The BUG_ON(in_interrupt()) in dm_table_event() is a historic leftover from a rework of the dm table code which changed the calling context.

Issuing a BUG for a wrong calling context is frowned upon and in_interrupt() is deprecated and only covering parts of the wrong contexts. The sanity check for the context is covered by CONFIG_DEBUG_ATOMIC_SLEEP and other debug facilities already.

Quoted 5 lines

I picked this up for 5.11, thanks.

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel