mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kevin Corry <kevcorry@us.ibm.com>
To: Joe Thornber <thornber@sistina.com>
Cc: DevMapper <dm-devel@sistina.com>, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] DM: 2.5.71: dm-ioctl.c: Unregister with devfs before renaming the device
Date: Mon, 16 Jun 2003 15:53:56 -0500	[thread overview]
Message-ID: <200306161553.57000.kevcorry@us.ibm.com> (raw)

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:
http://linux.bkbits.net:8080/linux-2.5/diffs/drivers/md/dm-ioctl.c@1.6?nav=index.html|src/|src/drivers|src/drivers/md|hist/drivers/md/dm-ioctl.c

--- 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);
+
 	list_del(&hc->name_list);
 	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);
 	register_with_devfs(hc);
 
 	up_write(&_hash_lock);


-- 
Kevin Corry
kevcorry@us.ibm.com
http://evms.sourceforge.net/


                 reply	other threads:[~2003-06-16 20:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200306161553.57000.kevcorry@us.ibm.com \
    --to=kevcorry@us.ibm.com \
    --cc=dm-devel@sistina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thornber@sistina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®