public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] Trivial fix for Oops on unmount.
@ 2003-06-12 14:21 Pantelis Antoniou
  2003-06-12 14:43 ` David Woodhouse
  0 siblings, 1 reply; 2+ messages in thread
From: Pantelis Antoniou @ 2003-06-12 14:21 UTC (permalink / raw)
  To: linux-mtd

[-- Attachment #1: Type: text/plain, Size: 134 bytes --]

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


[-- Attachment #2: oops.patch --]
[-- Type: text/plain, Size: 554 bytes --]

--- drivers/mtd/mtd_blkdevs-24.c	Thu Jun 12 15:44:47 2003
+++ drivers-nand/mtd/mtd_blkdevs-24.c	Thu Jun 12 17:21:15 2003
@@ -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);
 	}
 	

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Trivial fix for Oops on unmount.
  2003-06-12 14:21 [PATCH] Trivial fix for Oops on unmount Pantelis Antoniou
@ 2003-06-12 14:43 ` David Woodhouse
  0 siblings, 0 replies; 2+ messages in thread
From: David Woodhouse @ 2003-06-12 14:43 UTC (permalink / raw)
  To: Pantelis Antoniou; +Cc: linux-mtd

On Thu, 2003-06-12 at 15:21, Pantelis Antoniou wrote:
> 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.

-- 
dwmw2

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-06-12 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-12 14:21 [PATCH] Trivial fix for Oops on unmount Pantelis Antoniou
2003-06-12 14:43 ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox