ChangeSet 1.2096, 2004/11/12 11:42:46-08:00, maneesh@in.ibm.com [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 Signed-off-by: Greg Kroah-Hartman 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