Skip to contentSkip to conversation

Trivial fix for Oops on unmount.

PATCH In review Pantelis Antoniou 2 participants 2 messages Jun 12, 2003 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Trivial fix for Oops on unmount.

Hi

This is a trivial patch which fixes some oopses for me in 2.4.21-rc7 with MTD compiled in instead of modules.

Regards

Pantelis

mtd/mtd_blkdevs-24.c +4 -0
@@ -239,8 +239,10 @@
 		tr->usecount--;
 		dev->usecount--;
 		dev->mtd->usecount--;
+		if (dev->mtd->owner)
 		__MOD_DEC_USE_COUNT(dev->mtd->owner);
 	out_tr:
+		if (tr->owner)
 		__MOD_DEC_USE_COUNT(tr->owner);
 	}
  out:
@@ -279,7 +281,9 @@
 		tr->usecount--;
 		dev->usecount--;
 		dev->mtd->usecount--;
+		if (dev->mtd->owner)
 		__MOD_DEC_USE_COUNT(dev->mtd->owner);
+		if (tr->owner)
 		__MOD_DEC_USE_COUNT(tr->owner);
 	}
 	
#1 lore raw
Quoted 4 lines · Pantelis Antoniou

Hi

This is a trivial patch which fixes some oopses for me in 2.4.21-rc7 with MTD compiled in instead of modules.

Thanks... those were already fixed in CVS on the 26th of May, though.

Signature · 1 line
dwmw2