Commit 67127bef authored by Joe Thornber's avatar Joe Thornber Committed by Kai Germaschewski

[PATCH] dm: dm-ioctl.c: Unregister with 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
[Kevin Corry]
parent 1eba1937
......@@ -297,13 +297,14 @@ int dm_hash_rename(const char *old, const char *new)
/*
* 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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment