Re: [PATCH] More Driver Core patches for 2.6.10-rc1

From: Greg KH
Date: Fri Nov 12 2004 - 18:15:45 EST


ChangeSet 1.2096, 2004/11/12 11:42:46-08:00, maneesh@xxxxxxxxxx

[PATCH] sysfs: fix duplicate driver registration error

o Do not release existing directory if the new directory happens to be a
duplicate directory. Thanks to Kay Sievers for the testcase.

Signed-off-by: Maneesh Soni <maneesh@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <greg@xxxxxxxxx>


fs/sysfs/dir.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)


diff -Nru a/fs/sysfs/dir.c b/fs/sysfs/dir.c
--- a/fs/sysfs/dir.c 2004-11-12 14:53:18 -08:00
+++ b/fs/sysfs/dir.c 2004-11-12 14:53:18 -08:00
@@ -111,7 +111,7 @@
d_rehash(*d);
}
}
- if (error)
+ if (error && (error != -EEXIST))
d_drop(*d);
dput(*d);
} else

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