Commit 5e173955 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] devfs_mk_dir() fix

From: Christoph Hellwig <hch@lst.de>

There may be multiple gendisks with the same .devfs_name in scsi and we
call devfs_mk_dir on each of them.  At present that causes a nasty error
message.  It is better to permit devfs_mk_dir() to appear to have succeeded.

ie: it's a `mkdir -p'.
parent b91404d3
......@@ -1684,7 +1684,14 @@ int devfs_mk_dir(const char *fmt, ...)
}
error = _devfs_append_entry(dir, de, &old);
if (error) {
if (error == -EEXIST) {
/*
* devfs_mk_dir() of an already-existing directory will
* return success.
*/
error = 0;
devfs_put(old);
} else if (error) {
PRINTK("(%s): could not append to dir: %p \"%s\"\n",
buf, dir, dir->name);
devfs_put(old);
......
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