Actually, this is not a real fix from my point of view.
I argued in LKML for this. But Linus merged this code.

I will kill this WARN_ON and add some comments later.

-Bryan

On Tue, Dec 9, 2008 at 4:49 PM, Hennerich, Michael
<[EMAIL PROTECTED]> wrote:
> Do we really need WARN_ON here? –
>
> This spills hundredths' of lines WARNINGS on BF548-EZKIT kernel startup…
>
>
>
> Creating 3 MTD partitions on "physmap-flash.0":
>
> 0x00000000-0x00040000 : "bootloader(nor)"
>
> 0x00040000-0x00440000 : "linux kernel(nor)"
>
> ------------[ cut here ]------------
>
> WARNING: at mm/backing-dev.c:179 _bdi_register+0x98/0x9c()
>
> Modules linked in:
>
> Hardware
> Trace:
>
>
>
> ________________________________
>
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> [EMAIL PROTECTED]
> Sent: Monday, December 08, 2008 3:59 AM
> To: [email protected]
> Subject: [Linux-kernel-commits] [5833] trunk/mm/backing-dev.c: Fix bug
> [#4463] bfin_nand module would be failed if inserted twice
>
>
>
> Revision
>
> 5833
>
> Author
>
> cooloney
>
> Date
>
> 2008-12-07 20:58:56 -0600 (Sun, 07 Dec 2008)
>
> Log Message
>
> Fix bug [#4463] bfin_nand module would be failed if inserted twice
>
>
>
> I reported this bug to upstream. They also found it in Floppy driver.
>
> So I backport this fixing to our svn from upstream git.
>
>
>
> ----
>
> bdi: register sysfs bdi device only once per queue
>
>
>
> Devices which share the same queue, like floppies and mtd devices, get
>
> registered multiple times in the bdi interface, but bdi accounts only the
>
> last registered device of the devices sharing one queue.
>
>
>
> On remove, all earlier registered devices leak, stay around in sysfs, and
>
> cause "duplicate filename" errors if the devices are re-created.
>
>
>
> This prevents the creation of multiple bdi interfaces per queue, and the
>
> bdi device will carry the dev_t name of the block device which is the
>
> first one registered, of the pool of devices using the same queue.
>
>
>
> [EMAIL PROTECTED]: add a WARN_ON so we know which drivers are
> misbehaving]
>
> Tested-by: Peter Korsgaard <[EMAIL PROTECTED]>
>
> Acked-by: Peter Zijlstra <[EMAIL PROTECTED]>
>
> Signed-off-by: Kay Sievers <[EMAIL PROTECTED]>
>
> Cc: David Woodhouse <[EMAIL PROTECTED]>
>
> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
>
> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
>
> ---
>
> Modified Paths
>
> trunk/mm/backing-dev.c
>
> Diff
>
> Modified: trunk/mm/backing-dev.c (5832 => 5833)
>
>
>
> --- trunk/mm/backing-dev.c    2008-12-06 14:46:56 UTC (rev 5832)
>
> +++ trunk/mm/backing-dev.c    2008-12-08 02:58:56 UTC (rev 5833)
>
> @@ -176,6 +176,9 @@
>
>        int ret = 0;
>
>        struct device *dev;
>
>
>
> +      if (WARN_ON(bdi->dev))
>
> +             goto exit;
>
> +
>
>        va_start(args, fmt);
>
>        dev = device_create_vargs(bdi_class, parent, MKDEV(0, 0), bdi, fmt,
> args);
>
>        va_end(args);
>
> _______________________________________________
> Linux-kernel-commits mailing list
> [email protected]
> http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits
>
>

_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to