[PATCH] DM: 2.5.71: dm-ioctl.c: Unregister with devfs before renaming the device

From: Kevin Corry (kevcorry@us.ibm.com)
Date: Mon Jun 16 2003 - 15:53:56 EST

Unregister the previous name from devfs before renaming the device.

DM originally stored a devfs handle in the hash-cell, and performed the
unregister based on that handle. These devfs handles have since been removed,
and devices are registered and unregistered simply based on their names. So
the device now needs to be unregistered before we lose the name.

See the following BK change for more details:

--- linux-2.5.71a/drivers/md/dm-ioctl.c 16 Jun 2003 18:14:56 -0000
+++ linux-2.5.71b/drivers/md/dm-ioctl.c 16 Jun 2003 20:20:05 -0000
@@ -297,13 +297,14 @@
          * rename and move the name cell.
+ unregister_with_devfs(hc);
         old_name = hc->name;
         hc->name = new_name;
         list_add(&hc->name_list, _name_buckets + hash_str(new_name));
         /* rename the device node in devfs */
- unregister_with_devfs(hc);

Kevin Corry

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

This archive was generated by hypermail 2b29 : Mon Jun 23 2003 - 22:00:19 EST